Author Topic: deleted  (Read 12519 times)

acbaile

  • Newbie
  • *
  • Posts: 22
    • View Profile
deleted
« on: January 24, 2019, 04:00:24 PM »
deleted
« Last Edit: January 27, 2019, 09:16:02 PM by acbaile »

lerno

  • Full Member
  • ***
  • Posts: 247
    • View Profile
Re: Operation's priorities - more difficulties then benefits
« Reply #1 on: January 24, 2019, 04:26:35 PM »
Changing operator meanings to mean something completely different makes zero sense.

Note that operator precedence is already changed.

chqrlie

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Operation's priorities - more difficulties then benefits
« Reply #2 on: January 24, 2019, 04:48:37 PM »
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.
« Last Edit: January 24, 2019, 10:04:33 PM by chqrlie »

chqrlie

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Operation's priorities - more difficulties then benefits
« Reply #3 on: January 24, 2019, 10:08:20 PM »
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.