[DGD] Re: LPC repository

Felix A. Croes felix at dworkin.nl
Sun Dec 14 23:15:02 CET 1997


Claus Draeby <claus at harpo.ma.adfa.oz.au> wrote:
>[...]
> I am currently porting some rather old ( <= 1994 ) code for the Flat
> Earth MUD lib to DGD, and this at least contains some morsels that I
> think would be interesting. However, I have made some alterations to
> DGD to get it to work, most remarkly I have made (int)0 a true neutral
> element for plus, thus ensuring that:
> 	0 + x = x + 0 = x,
> regardless of the type of x. I think I will supply this as a package
> one day, but I have not talked it over with Dworkin yet. However it
> get rid of constructs like this
> 	mapping m;
> 	if (m["whatever"])
> 		m["whatever'] += ({ "another whatever" });
> 	else
> 		m["whatever'] = ({ "another whatever" });
> which in my DGD can be stated simply as:
> 	m["whatever'] += ({ "another whatever" });

What about

    string s;

    s += "foo" + 0;

or even

    int n;

    n = 0;
    write("the value of n is " + n + ".\n");


Dworkin



More information about the DGD mailing list