Why Ruby?

foobar foo at bar.com
Sun Dec 12 14:46:01 PST 2010


Andrei Alexandrescu Wrote:

[snip]

> Control flow inside the delegate can be addressed through a slightly 
> more complicated lowering (the kind foreach already does). Probably 
> break and continue should not be accepted because generally you can't 
> expect all user-defined constructs to do iteration. Early returns should 
> be easy to handle.
> 
> Andrei

http://yehudakatz.com/2010/02/07/the-building-blocks-of-ruby/

This talks about the semantics of Ruby's blocks and shows that Ruby can implement many language features such as "synchronized" by regular functions. This can be done partly because returning from a block also returns from it's enclosing function call. 




More information about the Digitalmars-d mailing list