On 11/30/13 7:35 PM, Brendan Zabarauskas wrote:
On 30 Nov 2013, at 5:34 pm, Oren Ben-Kiki <o...@ben-kiki.org> 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 is a totally different language without two kinds of closures. The problem is not the sugar, it's the inference.

Patrick

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to