▲ | pjmlp 21 hours ago | |||||||||||||
Have a look at Smalltalk blocks, or FP languages, to see where Ruby's inspiration comes from. | ||||||||||||||
▲ | vidarh 14 hours ago | parent | next [-] | |||||||||||||
Ruby is basically what happens when Smalltalk and Perl (compare the command line and the "$"-variables for example) has a baby and it inexplicably looks much better than both parents. | ||||||||||||||
▲ | frou_dh 20 hours ago | parent | prev | next [-] | |||||||||||||
An interesting thing about Smalltalk and Ruby blocks is that they aren't just anonymous functions/lambdas, right? i.e. if you 'return' / '^' in a block, it's the context around the block that you return from, not just the block itself? That's what struck me about both of them when I was used to thinking in basic Lisp terms. | ||||||||||||||
| ||||||||||||||
▲ | stonecharioteer 20 hours ago | parent | prev [-] | |||||||||||||
My next post, which is on loops, is about the common stuff with smalltalk as well! |