[3578] in java-interest

home help back first fref pref prev next nref lref last post

Re: declaration v.s. definition ambiguity

daemon@ATHENA.MIT.EDU (Gary Aitken)
Thu Nov 16 16:17:10 1995

Date: Thu, 16 Nov 1995 10:33:32 -0700
From: garya@village.org (Gary Aitken)
To: daconta@PrimeNet.Com (Michael Daconta)
Cc: java-interest@java.sun.com
In-Reply-To: <199511152309.QAA09818@usr5.primenet.com>



...
[deleted proposed wording for definition and declaration]
...
>I think you are close; however, I don't think there is actually any storage
>allocated for "the stuff which implements the class."  Not at runtime anyway.
>At compile time there is of course symbol table entries.  However,
>I think the ANSI C distinction of storage allocation was referring to
>runtime allocation.

But there *is* lots of storage allocation at runtime.  
Not necessarily dynamic heap / stack allocation, but storage allocation 
none the less, which has to be considered in C as well.  
Static variables are allocated by the loader; 
the space taken up by the function bodies is allocated by the loader.

> Of course, when you say,
>"It is declared and defined in one operation," that is not technically
>correct because a definition is a declaration.  That is why they are
>so often used interchangeable.  It is perfectly legal to say that for
>
>  int a;
>
>the identifier a is declared in this namespace.
>int a is a definition but a definition is a declaration so,
>(using logic) if A=B=C then A=C.

Yes, for sure.  That is a point which is often ignored, probably unwisely.

Gary Aitken		garya@village.org
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post