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

Felix A. Croes felix at dworkin.nl
Mon Dec 15 13:56:03 CET 1997


Gregory D Lewis <glewis at maths.adelaide.edu.au> wrote:
> 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 :)?

Such mudlibs have been in development for 4 years, and the only one that
ever got released is Melville...


> 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.

Why not simply cause an error?

Regards,
Dworkin



More information about the DGD mailing list