in reply to Re^3: Avoiding reference of sub optimization (notabug)
in thread Avoiding reference of sub optimization

I think everything outside your normal paths is per personal definition dubious.

Cheers Rolf

UPDATE: There is along list of "dubious" languages allowing the use of functions as objects. :)

  • Comment on Re^4: Avoiding reference of sub optimization (notabug)

Replies are listed 'Best First'.
Re^5: Avoiding reference of sub optimization (notabug)
by tye (Sage) on Mar 21, 2011 at 15:16 UTC

    Perhaps you define "dubious" as "anything outside one's normal paths" (or my paths, if I take you literally), but I don't. You'll note that your proposed usage doesn't actually work. It failing to work is not caused because I haven't personally tried that failing experiment.

    In order for your usage to work, you'd have to break less dubious usages that are already working (as well as making Perl less efficient).

    Note that you can also make $object->() work via overloading of a less-dubious object.

    - tye