3 ms·
If you just say blocks in ruby is a name for closures, or anonymous functions, a good programmer will understand it right away. Just b/c somebody codes mostly
by ardit33 18y ago
If you just say blocks in ruby is a name for closures, or anonymous functions, a good programmer will understand it right away. Just b/c somebody codes mostly java, doesn't mean that they don't know these fundemental concepts.
No need to put java programmers in one basket. mkay.... (and java has anonymous classes, but they are heavy-weight and don't have proper closures you find in dynamic languages, still they are there, and a good programmer will know/have used at some point).
- sunkencity 18y agoWhat I was trying to say was that maybe if you are not a great programmer well rounded in the programming pantheon, it will be more of a revelation to you. As a perl/php/java guy it took a while for closures to sink in for me, that it's more niftiness involved than just a callback function. If one already knows how to use an anonymous class it's no biggie I admit, but if you don't it is :).