Re: Declaring and Checking Non-Null Types

Daniel Bonniot <[email protected]> Thu, 25 Mar 2004 00:03:42 +0100
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
>class PPP {
>   PPP parent;
>   PPP child;
>}
>  
>
If you want an instance of this class with finite memory usage, you will 
need somebody who is their own ancestor... ;-)

But in general I agree that there is a need for recursive definitions of 
values, which will have to be adressed. I would imagine something like:

  let papa = new Papa(child: bambino),
      bambino = new Child(parent: papa);

Both instances would be created, then both initializers could be run in 
turn. The names being declared could only be used either as the value of 
a field, or inside an anomymous function which is the value of a field. 
This guarantees that the new instances are not used before they are 
fully constructed.

Daniel




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click