V
Vassil Nikolov
...
In another example, he seems to
think C programmers should know what "b+++c" does,
but don't and that this is an argument against C.
(I'm not too shy to admit *I* wasn't sure what "b+++c"
does. FWIW, gcc behaves as expected when faced with
either "b+ ++c" or "b++ +c" and treats "b+++c" as the
latter. But I can't imagine the "+++" form except in a
trolling question or in an Obfuscation Contest entry.)
The meaning of
b+++c
in the C programming language cannot be asserted by what a compiler
does with it, but by the syntactic rule (which I thought was very
well known) that, essentially, tokenization is greedy (there is no
`+++' token in the grammar, and `++' is longer than `+', therefore
the tokenization of the above is `b' `++' `+' `c').
(BTW, gcc accepts both "a+ + + +b" and "a+ ++ +b"
without complaint but generates *different* results
for them! Is *this* compliant?)
These are two different expressions, of course, but is
+b
an lvalue?
...
By this measure, Fateman might win the debate with
(dolist (x Foo)
(Guzzle x))
compared with C's slightly less terse
for (x = Foo_head; x; x = x->next)
Guzzle(x);
but a C programmer might #define dolist
if tersity is all that matters.
What would that definition look like? (The body of DOLIST may
contain an arbitrary number of forms.)
---Vassil.