...Adding "class enum" does not
increase the number of reserved words...
Have you considered offering your services to one of Obama or McCain to
construct political arguments. :)
No, it does not increase the number of reserved words. It is a phrase so
increases the number of reserved phrases. With today's CPU speeds and
memory sizes, one more entry in the compiler's table of reserved words is of
minimal importance. An additional entry in the programmer's mind is the
issue and here we have a phrase to add to the table of words.
One other things:
At one level:
Look at the similar manner in which a class, a struct and an enum are
defined. They are specific, brace-enclosed entities, each with specific
rules on what is enclosed. Each is a specific concept, different from the
others. Now class is combined with the different but somewhat similar
looking in definition enum to form yet another, analagous to saying 'class
struct' or 'struct class' or 'struct enum'. The symantically inconsistency
annoys me. Using 'classenum' also annoys me but I was throwing in a word as
a place holder in describing things. The argument that 'classenum' is not a
good selection is not material. I have no dog in that fight.
At another level:
TPTB in C++ seem to have never felt overly burdened by a need for things to
have a relation between a word's meaning, if it has any, and its meaning in
the language. I contend that when possible, a word with a relationship be
used as it enhances understanding. C++ is growing in a PL/I fashion and
people routinely use some subset of it in what they do, using other things
infrequently. That relationship helps them when using those infrequently
used items. I admit that 'classenum' kind of passes this test although
'class enum' arguably does not.
Of course they could something similar to what was done by picking 'pragma',
an obscure word whose only meaning that I know of dealt with styles of love.
Essentially it is a newly coined term without meaning to which they assigned
a meaning. Perhaps they should have considered 'constrotinangle' :)
Third level:
Number of reserved words is a red herring. To use C++ you need to know the
words important to using the language and that includes those in the base
language and those in the libraries. If we need a new item for an
enumurated type which has strong typing and does not implicitly convert then
of course it should be added. However the differences from 'enum' are
enough that I wonder about why 'enum' would be used in its name at all. For
example, it is much further removed than the difference between 'class' and
'struct' yet those two have totally different names.
. Ed
Post by Ed Mulroy [TeamB]'keyword bloat' is not a valid argument. 'class enum' is the new keyword.
Should have said "reserved word bloat". Adding "class enum" does not
increase the number of reserved words. As a programmer, I do not have
to know that it is considered a single symbol by the compiler until I
decide to learn how to use it in my programs.
IMO, languages with a large number of reserved words are problematic
to use (and I have used some). It sometimes is difficult to determine
that the cause of a problem is that a function name I have used is a
reserved word that I have not memorized.
If "class enum" is added to the language, I do not have to even know
about it to continue with my work as before. If "classenum" is added I
do have to get the notice or my code may be broken.
You may not think it is an important argument, but it is valid.
Post by Ed Mulroy [TeamB]Remembering all the reserved words is another red herring.
'class enum' means they have to remember the new, 2-word keyword
Why? Reserved words need to be avoided when I name my own variables
and functions, so I need to be familiar with all of them. Haw can
adding "class enum" to the language affect me at all if I choose to
remain ignorant of it (as I suspect most users will for a number of
years).
Sure, if I want to stay on top of the new developments in the language
there is almost no difference between adding "class enum" and adding
"classenum" to the language - either way I'll learn to use it
properly. But if I don't quickly consume the new standard when it is
implemented, "classenum" could hut me, "class enum" could not.