[DGD] [Melville] non-static mappings

Mikael Lind z94lind at mtek.chalmers.se
Thu Feb 7 00:07:43 CET 2002


Quoting Erwin Harte from 08:40, 2002-02-06:

> [...]
>
> I am, my code would fall apart if DGD didn't behave like that.
>
> object  ob1, ob2;
> mapping map;
>
>   ob1 = ...something non-nil...
>   ob2 = ...something non-nil...
>
>   map = ([ ob1: 1,
>            2:   ob2 ]);
>
> Now, if either ob1 or ob2 gets destroyed, the relevant index:value
> pair in the mapping will disappear.

Is this really true for ob1, though? I would have thought that when
ob1 is destructed, it would be replaced by nil, which is a valid
mapping index. So, with both ob1 and ob2 destructed, map would be
([ nil: 1 ]).

By the way, was this what you needed the coffee for? ;D

// Mikael / Elemel

--
I wished for 4 uncursed scrolls of gold detection
and all I got was this lousy .signature

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



More information about the DGD mailing list