| Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes:I'd say that just the (known) flaw makes them (slightly) complicated;[...][...]
C's operator precedence rules are complicated and arguably flawed.
They could have been defined differently. A simpler set of rules,There are. (What I called above as "derived underlying logic".) Some
with fewer levels, *might* have been better. I don't have any
concrete suggestions -- nor do I have any strong preferences.
I accept C's rules as they are. I would accept them if they had
been defined differently.
Nothing about the current rules particularly bothers me. There are
no objective criteria for deciding what the rules *should* be.
Even having multiplication bind more tightly than addition is(Now opinions are getting really strange; in the above stated sense.)
fundamentally an arbitrary choice
(though one that's almostThe more complex the expressions are the more structure they need.
universally recognized, even outside the context of programming
languages).
[...]
If not, people can choose to ignore those them when writing C code,Yes, they can, and I personally tend to agree that they should.
for example like this where all () are technically superfluous:
>
crcu32 = (crcu32 >> 4) ^ s_crc32[(crcu32 & 0xF) ^ (b & 0xF)];
Huh? - How that? - Are you saying here that practically only C-like[...]When designing a new language, there are real advantages in strictly
imitating C's rules, just because so many programmers are familiar
with them.
(I would have been silly for C++ or Objective-C toOr - with reference to that flaw - just more consistent.
change the precedence rules, even to improve them.) But there
are also real advantages in using precedence rules that are better
(e.g., simpler) than C's.
It depends on the nature of the language.Janis
It could be an interesting discussion for comp.lang.misc.
Les messages affichés proviennent d'usenet.