On Thu Aug  2 12:13:09 2012, Patrick Walton wrote:
On 08/02/2012 09:10 AM, Donovan Preston wrote:
I would be more in favor of this proposal if the semicolon was not
optional. Having the ability to have code that is identical except for a
semicolon just doesn't feel right to me.

If the semicolon were mandatory at the end of blocks, you'd have to
write:

    let x = if cond { 3; } else { 5; }

Which would be a non-starter, IMHO.

Yes, it's definitely not pretty. At least it's a consistent rule to remember though; it's the inconsistency that makes me uncomfortable.


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

Reply via email to