[3420] in java-interest
declaration v.s. definition ambiguity
daemon@ATHENA.MIT.EDU (Michael C. Daconta)
Fri Nov 10 21:12:26 1995
Date: Fri, 10 Nov 1995 15:44:08 -0700
To: java-interest@java.sun.com
From: daconta@PrimeNet.Com (Michael C. Daconta)
There seems to be a desperate need for clear definitions of
declaration versus definition as related to C, C++, and
Java.
Specifically in ANSI C, the distinction was the allocation of
storage space denoting a definition.
In the ARM, Stroustrup seemed to stick with that but did
not necessarily agree with it for class declarations (he would
have preferred to call them class definitions).
In the proposed C++ standard, the distinction seemed to have
changed whereby a declaration solely means name scope and
definition means everything else (although there are sections
of the document that ambigously use both terms and some areas
of the document that incorrectly use one term where they mean
the other).
Java seems to have done away with declarations all together and
just uses definitions. However, for classes this would go
against the idea that reservation of storage space denotes
definition.
Would it therefore be safe to say that in Java, all classes
and data members are defined. And that definition is both the
act of reserving a name in the enclosing scope and reserving memory
for primitive data types. For user-defined data types definition
is the announcement to the compiler of all the data members and
methods in the class.
The above is what I have been able to gleen from all my
documentation (some of which is conflicting). All help to
clear this up is appreciated.
- Mike Daconta
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com