http://qs321.pair.com?node_id=1019541


in reply to Re^3: Managing capture
in thread Managing capture

Yes, that would work. However, the drawbacks of this to me are:

  1. the check happens at runtime, not compiletime
  2. it requires each method taking a callback to implement the cycle check. that might be in 3rd party code and so require additional wrapping etc.

Replies are listed 'Best First'.
Re^5: Managing capture
by Anonymous Monk on Feb 19, 2013 at 13:22 UTC

    ...

    Yup,

    otoh, its cheap check (cheaper than universal competence )

    and simpler to write than a pragma like autovivification -- have you looked at that thing? it walks the perl op-tree using c --- scary :)