Re: [rust-dev] syntactic sugar for blocks in expressions

2012-01-05 Thread Niko Matsakis
As discussed, I have pushed the changes which allow block syntactic sugar in expressions. I think the best way to describe the rules is as follows: - In Rust, a statement is either a declaration or an expression followed by a semicolon. The result of evaluating the expression is ignored. -

Re: [rust-dev] syntactic sugar for blocks in expressions

2012-01-02 Thread Marijn Haverbeke
My first reaction is 'oh god no! that complicates the rules even more!'. But then I remembered how frustrating it is to work out a proposal and have it shot down for vague knee-jerk reasons like that. So, eh, let's just try this for a while and see whether it causes more confusion than the rules we

[rust-dev] syntactic sugar for blocks in expressions

2011-12-29 Thread Niko Matsakis
I've been working for a while now on making it possible to use the syntactic sugar for blocks within expressions. I've been doing various iterations, trying to find the formulation that was both (a) easy enough to explain and (b) made minimal changes to the existing language syntax / code. Al