Manifest constants (was const again)

"Jérôme M. Berger" jeberger at free.fr
Sat Dec 8 02:55:47 PST 2007


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

Walter Bright wrote:
>> 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) ?
> 
	extern(C) means one of two things:
 * Either the following is something that is outside the current
code (external) and will be accessed using the "C" convention;
 * Or it is something that is inside the current code but should be
accessible from outside (externally) using the "C" convention.

> 
>> 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.
> 
	I never said that you could understand a keyword completely and in
all its nuances simply from its name. However, tell any programmer,
whether a C programmer or not, that "long" is short for "long
integer" and they will understand immediately.

> 
>>     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.
	Ask any one who is not a mathematician and he will tell you that
you need at least two elements in a list. Moreover, even if there is
only one element in the list at this particular time, there is still
the implication that there could be others.

> 'virtual' should also be added to the list of keywords that have no
> connection to their dictionary meaning.
virtual
    Is used to suggest that something is in effect what you say it
    is, although it is not formally recognized as such.

    That's not too far off: a virtual method is a function that is
    in effect what the child class says it is although the base
    class doesn't know it. I'll admit that this is a little more far
    fetched, but:
    - Just because there already are a few far-fetched concepts in
      programming isn't a reason to add another;
    - There is no implied meaning in the word "virtual" that
      conflict with the programming concept, whereas there is an
      implied meaning in "enum" that it concerns a list of several
      values.

		Jerome
- --
+------------------------- 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)

iD8DBQFHWngzd0kWM4JG3k8RAqrpAKC0xa2b1sAxclmKmYShEbuDYTNPLQCfTAM1
tZv7gH3U/jGnAd1VTQQK8uY=
=42Tt
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list