[DGD] function pointers

Felix A. Croes felix at dworkin.nl
Sat Jun 25 18:19:39 CEST 2011


Noah Gibbs <noah_gibbs at yahoo.com> wrote:

>[...]
>   The DGD hack for function pointers is a less-convenient way to deal with
> them than real function values -- which is fine, the language lacks the
> vast majority of the abstractions you'd want to take real advantage of that.

What's more important is that DGD's LPC runtime has evolved in a direction
that makes patching in closures difficult.  You can't recompile anonymous
functions the way you can recompile objects, which means big trouble in a
persistent mud.

For example, in the Discworld mudlib (which runs on FluffOS), many objects
export closures through the query_patterns function, which are then held in
a central object.  When the originating object is recompiled, the closures
should be recompiled as well, but since they're anonymous, there is no way
to map source code to closure anymore.

Regards,
Felix Croes



More information about the DGD mailing list