3 ms·
First time I saw the find by example feature I thought "maybe it tries all applicable methods" but then immediately dismissed the idea because it could execute
by draven 4y ago
First time I saw the find by example feature I thought "maybe it tries all applicable methods" but then immediately dismissed the idea because it could execute methods with side-effects. Does Pharo somehow knows about safe/unsafe methods ?
- rscho 4y agoI don't think it really does. If I remember correctly, there's a bit of white/blacklisting going on under there.
- samatman 4y agoSmalltalk code is full of these kinds of unprincipled solutions which work better than they should. You can get away with a lot of saying "just trust me" when everything is exposed for immediate exploration of whether invariants are in fact preserved.
- trashburger 4y agoI also noticed that the reimplementation uses `receiver deepCopy` for each message send to preserve the original object, so that side effects would not affect the receiver.
- tonyg 4y agoThe original method finder in squeak has a blacklist of methods not to try, but otherwise works just as you imagine. There's some very cool recent work on isolating effects at a low level that should obviate such grody hacks! Then the system really can freely and safely try all applicable methods. See thread up and down from here https://twitter.com/leastfixedpoint/status/1512391756318392324 https://twitter.com/leastfixedpoint/status/15123917563183923...