[DGD] Re: Zero (was Re: LPC repository)

Gregory D Lewis glewis at maths.adelaide.edu.au
Mon Dec 15 03:18:19 CET 1997


Dworkin wrote:

> A change I would prefer (which would make the server incompatible with
> LPmud 2.4.5, and thus was abandoned with regret) would be to initialize
> variables to `null' rather than integer 0, `null' being a special value
> that is equal to nothing but itself, and has typeof(null) == T_NONE.
> Null can then be a safe neutral element for addition.

IMO, this would be an excellent change.  I assume one would be able to create
a "null" value?  One of the things I think DGD lacks is this very feature.
Maybe this could be made in the experimental development line?  How important
is it for DGD 1.2 to run 2.4.5 (one would hope one of the people using DGD 
would have a fully featured public release mudlib done by then :)?

The difficulty with the current situation, as I'm sure people are aware, is
with functions like the one I have written to mimic MudOS save_variable.
Literally every conceivable value is a valid return from this function.  On
an error I currently return the minimum integer (since its only representable
in hex and it seems somewhat unlikely to be used) but this is clearly a kludge.
I would be much happier to return a value that could be tested as "null" rather
that one which is conceivably also a valid value.  Similarly, a function like
atoi can return any integer value validly and it is difficult to pick one that
indicates an error.

I would certainly like to say "please!" with regards to this feature but I'm
not sure the people whose mudlibs this would break are going to be behind me :).

-- 
Greg Lewis                              Applied Maths Department
Email : glewis at maths.adelaide.edu.au    University of Adelaide
--
What makes the universe so hard to comprehend is that there's nothing
to compare it with.



List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list