Manifest constants (was const again)

"Jérôme M. Berger" jeberger at free.fr
Sat Dec 8 01:40:26 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walter Bright wrote:
> Bill Baxter wrote:
>> Whereas most of us are looking at the *words* and saying "which of
>> these words best describes what we're trying to do?"
> 
> Keywords in programming languages often only have a remote semantic
> connection with their dictionary meaning, and sometimes none at all. But
> this still works because our brains are pretty good at switching into,
> say, "C mode" when reading C code, and we have no problem understanding
> that 'static' in one context means a member function without a 'this'
> pointer, while 'static' in another context means the variable is
> allocated space in the data segment rather than the stack segment.
> Neither definition is in the dictionary. I could argue similarly for
> 'class', 'extern', 'long', etc.
> 
	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;

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;

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.



	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.

		Jerome

PS: All definitions courtesy of the Collins Cobuild dictionary,
emphasis added by me.

- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeberger at free.fr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeberger at jabber.fr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHWmaKd0kWM4JG3k8RAoXsAJ4+qETWDtMQFk2zRD5bJYVj04MwGwCaAy21
BVtkfQEng8VLfiMDJjr9/U8=
=8Hq1
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list