On 12/01/2013 04:35 AM, Brendan Zabarauskas wrote:
On 30 Nov 2013, at 5:34 pm, Oren Ben-Kiki <[email protected]> wrote:

I find `do` syntax form is vital for DSL-ish code. Getting rid of it makes a 
lot of code look downright ugly. I'd rather it used a more Ruby-ish notation 
though, I find that putting the `do` far away from the `{ ... }` doesn't read 
well. `foo(....) do |...| { ... }` would have made more sense for me (think of 
`do` as a macro-ish binary operation injecting the proc into the function on 
the left). But the current form is acceptable

This really is an important point. I would recommend folks look at Shoes 
(http://shoesrb.com/) for an example of how Ruby’s block syntax can help create 
beautiful APIs.

Ruby has no macros, has it?

Denis
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to