top | item 37385430

(no title)

vgel | 2 years ago

I think because it's ambiguous with unary plus (a = +b), since C isn't supposed to have significant whitespace in most circumstances.

discuss

order

tom_|2 years ago

You also run into problems with a=*p and a=-b, which are perhaps more likely.

zeusk|2 years ago

But they could've fixed that by going a=(*p) and a=(-b);

Kind of how we use (*p)->next instead of *p->next where p is node_t**

kazinator|2 years ago

But originally there wasn't a += or =+ lexical token! Those things were scanned as separate tokens, and could be written = +.

So that is problematic; If {a}{=}{-}{b} means a = a - b, then you have no way to write a = -b without parentheses like a = (-b).