Jan. 10, 2012
12:20 p.m.
I think we all noticed that :) With the exception that blocks return the value of the last statement, and methods return self by default. I would love if you could make an explicit local return from a block too. On 10 January 2012 01:52, James Ladd <james_ladd@hotmail.com> wrote:
While implementing Redline Smalltalk it occurred to me that methods and blocks are the same things, making the use of blocks to represent methods a possible optimisation or simplification to the internal of any Smalltalk implementation.
For example,
at: key put: value <statements here>
Is not that different to:
at:put: [ :key :value | <statements here> ]
Just saying.
-- Milan Mimica http://sparklet.sf.net