One of the things I was most impressed with when digging into Pharo was that the Finder could do find-by-example. I'd previously only seen this in languages like Haskell, where it's possible to know for certain that a function has no side effects. How does Pharo manage to implement this in a way that is safe, performant, and side-effect free?
How does find-by-example work in the Pharo Finder?
Magic :)
Actually... although I've been dreaming about creating the list from the tests automatically, the reality is that we manually maintain a list of safe messages (obviously error-prone; I seriously doubt it's 100% accurate). See MethodFinder>>#initialize
.
So a trick, but not exactly magic ;)
Thanks! BTW, I'm using this capability to melt faces over here:devblog.avdi.org/2015/05/11/… –
Beeck
It's worth noting that Pharo inherited this capability from Squeak Smalltalk. The Method Finder (by Ted Kaehler) is more than 15 years old now). –
Lucas
Squeak was is and will be awesome, Pharo is based on it and owes so much to the hard work of people that made Squeak possible. Thanks guys. –
Klos
@BertFreudenberg let's also add that Kaehler's goal was to provide "programming by example" capabilities. The finder was a very nice step in that direction. The finder could also be related to implementing transactions (as GemStone does) or, more ambitiously, undo. –
Goodall
© 2022 - 2024 — McMap. All rights reserved.