[DGD] lambda operator re-re-visited?

Dread Quixadhal quixadhal at gmail.com
Wed Jan 4 01:13:20 CET 2017


My thoughts, from outside the bubble, are that it doesn't seem like a show
stopper to place some risk with the coder.

If you write a closure which references an object which is no longer
present, this should generate a run-time error when the closure is
re-evaluated.  This is unfortunate, but it's a fact of life in any dynamic
language.  The coder will have to address this when it happens.

If you update a dependency which causes the same condition, it still falls
on the coder who is using the closure to fix their code.

If you update a dependency which causes changed behavior, but not an actual
error... this is the most unpleasant situation, but again, not anything
which is unknown in the software universe.  In that case, the coder who
updated the dependency and changed its behavior should have documented this
change, or provided a new API for the newer behavior.

To me, it sounds like disallowing the use of a mandolin slicer in the
kitchen, because it's very easy to slice your fingertips with one.  This is
very true, I've done it, but that slicer is also incredibly useful and I'd
hate to not have it.

On Tue, Jan 3, 2017 at 3:04 PM, Felix A. Croes <felix at dworkin.nl> wrote:

> Carter Cheng <cartercheng at gmail.com> wrote:
>
> >[...]
> > Recompiling L should be handled by a
> > special mechanism like a kfun with proper inspection i.e. reporting as a
> > string what the code was initially and what variables are captured and
> > their current constant values.
>
> This does not address the main issue.  Anonymous functions cannot be
> linked to an upgrade path, even if the source code is known.
>
> For instance, the following code:
>
>     function bar1() { return &foo(); }
>     function bar2() { return &foo(); }
>
> is upgraded to:
>
>     function bar1() { return &foo(); }
>     function bar2() { return &gnu(); }
>
> An anonymous function exported by this object has no unambiguous
> upgrade path.
>
> Regards,
> Felix Croes
> ____________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
>



More information about the DGD mailing list