On data types

Matthew Tuck matty@box.net.au
Sat, 28 Nov 1998 20:17:08 +1030


Ursula Dreier wrote:

> There is a way to simulate a pointer to a class aX: Create a new class
> aPX containing just an instance item of class aX. Because the copy is a
> flat one, you can have instances reference the same aX object.

Yes, this is basically standard sharing semantics.  I'm not convinced
this is necessarily the way to go long-term.  In my studies I'm
beginning to think value semantics with pointer types might be the best
way, but I'm prepeared to go with sharing semantics at the moment.

> But note also: The instance item is guaranteed always to reference some
> aX.

Why can't it be a null (no object)?

-- 
     Matthew Tuck - Software Developer & All-Round Nice Guy
                              ***
       Check out the Ultra programming language project!
              http://www.box.net.au/~matty/ultra/