General Category > Ideas

deleted

(1/1)

acbaile:
deleted

lerno:
Changing operator meanings to mean something completely different makes zero sense.

Note that operator precedence is already changed.

chqrlie:
You cannot seriously proposeto change the meaning of operators such as <, >, << or >> ... It would be catastrophic.

Regarding the sometimes counter intuitive order of precedence of the lesser used operators, it is indeed confusing and error-prone. Many compiles offer warnings for unparenthesized use, preventing common errors.

Changing the precedence rules is IMHO a bad idea because it is a gratuitous difference with C, causing more confusion when porting code and/or writing in both languages. A simpler proposal is to make these relative precedence of these operators undefined, causing compile time errors when the are used without parentheses except for simple arguments and unary operators.  This would make some C code incompatible with C2 but would preserve compatibility of C2 code with C.

chqrlie:
What is ergonomical in swapping the semantics of < and << ?
Can you cite another language where a < b does not mean a less than b?
This change is a gratuitous departure from common practice, not just C compatibility... very confusing and not at all ergonomical.

Navigation

[0] Message Index

Go to full version