in reply to Re: Re: callback or call now?
in thread callback or call now?

If a "hard link" value is always a double-reference, written with two backslashes and the (properly-typed symbol), then it is consistent.

My point was aimed in the other direction: are all double-references ever and always going to correspond to your current definition of a "hard link". And not just in this block of code.

That level of unambiguity you won't attain. That may be setting the bar unnecessarily high.

I do think that in two years, the puppy will a dog, and anyone who looks will be tracing the calls to find the point of the extra indirection.

You could document it, but then what is the point?

Replies are listed 'Best First'.
Re: callback or call now?
by John M. Dlugosz (Monsignor) on Oct 17, 2002 at 18:13 UTC
    Yes, I posted it because I think it would be a useful idiom in general for \\&foo to mean the same as sub{\&foo} to code that does this kind of stuff.

    As for its presence in this module causing farther spread that must be traced back to this module's use of it, it won't happen with this particular module. I expect it will be "statically" configured in a hash, not generated and passed in by other code (since this happens first!). The internal use to figure out what different types of values mean will all be encapsulated.

    —John

      How is it useful?

      It is concise to pretend that a SCALAR is the same as a CODE, but they are not. Then the hash is here, but it is processed by those routines over there on the next screen, big hash. So the context that would tell the reader that this convention applies is not near the usage. So the convention must be described in comments, that must be kept in sync with the code yada, yada, badda bing blah ...

      You're a ... Why you... You are a ... You, you golfer you!

      Have fun with your code.