[Pharo-project] Optimisation / Simplification ...

Johan Brichau johan at inceptive.be
Thu Jan 12 14:23:32 CET 2012


Hi,

With the exception of any return statement in <statements here>, which should do a non-local return instead of returning from the block.
I just read an interesting post on why functions (or methods) are not blocks: http://yehudakatz.com/2012/01/10/javascript-needs-blocks/

best,
Johan

On 10 Jan 2012, at 01:52, James Ladd 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.




More information about the Pharo-project mailing list