On 10-11-25 03:56 PM, Patrick Walton wrote:
On 11/25/2010 2:16 PM, Igor Bukanov wrote:
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.

Yeah. Only option 2 is "separators", and so far nobody likes that. Which is good! I don't like it either. Let's assume it's dead.

Option 3 is the most-forgiving, in the sense that it disturbs the fewest existing uses: expression-y lisp and ML people can write how they like, statement-y C and C++ people can write how they like. The only users who will be surprised are those expecting gnu-C-extensions; they will have to leave a semicolon off to get the semantics they want.

And *all* proposals are compatible with adding a ternary operator (as a shorthand). That's an orthogonal question.

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

Reply via email to