Re: If you could change the C or C++ or Java syntax, what would you like different?

Keith Thompson <kst-u@xxxxxxx> writes:

felix@xxxxxxxxxxxx (Felix Palmen) writes:
* Keith Thompson <kst-u@xxxxxxx>:
And if you don't give it both names, then "Car" is an alias for
an anonymous struct type.

Well, as this applies to nearly anything you have written in response,
I'll just put it here:

You can either pretend you're a compiler and don't know anything more
abstract than your grammar (and the standard defining it) -- or you can
just apply some human abstraction to understand the /intention/ behind
C's language constructs and ask yourself in that context whether typedef
is a good name or not.

My decision is clear: the name is perfect.

It's not a matter of applying or not applying "some human abstraction".
You and I are just apply *different* abstractions to the same construct.
And the one I'm using matches the one used by the C standard.

typedef does not define a type. It defines a name for a type.

Amazing. Simply amazing.

Yet 99% of people will use it to "define a type".

"Avoid hyperbole at all costs, its the most destructive argument on
the planet" - Mark McIntyre in comp.lang.c

Relevant Pages