4 ms·
> … other control flow features like "redo", "retry", "next", "rescue", "finally", and others. At-a-glance afaict Smalltalk provides those features too, so I w
by igouy 1y ago
> … other control flow features like "redo", "retry", "next", "rescue", "finally", and others.
At-a-glance afaict Smalltalk provides those features too, so I would guess Smalltalk blocks may have access to the call stack too?
https://drcuis.github.io/TheCuisBook/The-Debugger.html https://drcuis.github.io/TheCuisBook/The-Debugger.html
- drnewman 1y agoYes Smalltalk has continuations. So it can do all of those things as well. But I don't think they're explicitly tied to blocks like they are in Ruby. This really isn't a problem for Smalltalk since it's not as syntax oriented as Ruby. The invovation is to have those features tied to convenient syntax.
- igouy 1y agoSo is the innovation to make something that was available in Lisps / Smalltalks, available within the different constraints of Ruby. (I should check how Smalltalk blocks behave.)
- igouy 1y agofwiw "Efficient Implementation of Smalltalk Block Returns" https://wirfs-brock.com/allen/things/smalltalk-things/efficient-implementation-smalltalk-block-returns https://wirfs-brock.com/allen/things/smalltalk-things/effici...
- drnewman 1y agoI’ll check it out. Thank you.
- drnewman 1y agoI would say more broadly the innovation was two fold: 1) to make these features available in a syntactic form that would seem more familiar to programmers and 2) the powerful insight that when combined with Smalltalk style meta programming you can have a language that on the surface seems very conventional but underneath is just as powerful as Smalltalk or Lisp. Although I would say he didn’t get 100% there although that this point Ruby isn’t too far from that. These are ideas that I think are worth trying to take even further. In fact, I’ve been experimenting with that.