On 11/25/2010 2:16 PM, Igor Bukanov wrote:
On 24 November 2010 16:32, Jeffrey Yasskin<[email protected]> wrote:
I would like #4 best, but to do it right you'd have to infer the
expected type of the branched completion from its context, and I think
you don't yet do any top-down typechecking (except a bit in
pattern-alt which may not help with this case). After that, #3, even
though I'll definitely get confused when I terminate my blocks with a
semicolon and they stop working as values.
For me the semicoln-as-separator, not terminator, was the worst
feature of programming in Pascal. Everybody hated it as the extra
semicolon was way to often the sole reason for compilation errors. I
suspect that was part of the reasons to switch to Borland C++.
Keep in mind proposal #3 allows you to write code exactly as you would
in C++. You always use the semicolon as a statement terminator. It's
just that if you want to use a block as an expression (which is
forbidden in ordinary C++), you can leave off the final semicolon. So
it's really an extension to C++'s syntax, not a different sort of
behavior entirely.
Patrick
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev