Manifest constants (was const again)

Walter Bright newshound1 at digitalmars.com
Sat Dec 8 02:04:20 PST 2007


Jérôme M. Berger wrote:
> 	I've always thought that "static" was a poor keyword for
> what it does. As for the others, your argument doesn't stand:
> 
> class
>     A class of people or things is a number of people or things that
>     are considered together because *they have similar
>     characteristics*
> 
>     It is therefore natural to define a class by the "similar
>     characteristics" of its instances;

I'll concede that one.

> extern (short for "external" or "externally")
>     Happening, coming from, or existing outside a particular place
>     [...]
> 
>     That is precisely what happens with most "extern" identifiers:
>     they exist outside the current source file. From there, it is
>     not too stretching to use the "extern" keyword to define how
>     public identifiers will behave as seen from the outside;

How does that fit with extern(C) ?


> long (short for "long int")
>     Long is used when giving information about the length of
>     something [...]
> 
>     Again, this is very descriptive of what a "long" is.

Ask someone who is a programmer, but not a C programmer, what a "long" 
is, and they will have no idea.


> 	However, the dictionary definition for enumerate doesn't fit
> for a single value:
> 
> enumerate
>     When you enumerate a *list* of things, you name each one in
>     turn.

A list of one is still a list. My dictionary defines enumerate as: "to 
name one by one". That certainly fits:
	enum X = 3;
	enum Y = 4;
as I'm naming X and Y one by one. At least it fits as well as the other 
keywords do.

'virtual' should also be added to the list of keywords that have no 
connection to their dictionary meaning.



More information about the Digitalmars-d mailing list