1,035 karma · joined Mar 11, 2009 (17y ago) · 496 submissions
comment 1y ago · link · parent
comment 1y ago · link · parent
I'm sure some other runtimes don't do it, too.
comment 1y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
And method_missing is a such fundamental part of the language, that it obvious you skipped basic docs on the language. Besides that, there're not many "magic references". Unlike in python, btw, where "there should be 1 obvious solution to any problem" mantra doesn't hold for a veeery long time.
comment 2y ago · link · parent
Main power of blocks is not being multiline or being closure-like, many languages have this. But blocks are not just anonymous functions or lambdas, they have ability to return from the outer method (or from the method to which it was passed with break), acting as a powerful tool for creating your own flow control structures if needed, or just replacing "for". Of the languages I know or heard of only smalltalk does the same.
You can live without those, you can live even without early return, but blocks are not a misfeature, it's a great and intuitive tool. And python's rudimentary lambdas make me cry a little.
comment 2y ago · link · parent
comment 2y ago · link · parent