Canol Gökel


Sloganı olmayan blog

If you want to understand blocks, then learn Smalltalk

When I was taking a look at Ruby to learn what is it like, I faced a concept called “block”. But I never got it bacause you could do everything with a block, also with traditional methods you learned so far. So I asked myself, why would a human being invent something like block? Maybe this is because of the people who tries to explain the blocks or because of my low IQ but this was the case for me when learning Ruby.

Then I started learning Smalltalk and even before I get to the blocks chapter of Blue Book, I thought there should be some kind of structure to group some expressions so that we can pass them as arguments and so that we can have controlling messages. And Smalltalk showed me the real meaning of the block concept, I got the subject at the first reading.

But if the block concept of Ruby is different then the block concept of Smalltalk and this observation is totally wrong then I would definately like to hear it.

Filed under: Programming, , ,