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 <[email protected]> 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

Reply via email to