in reply to The trap of reference numification

It's a pity that overloading creates such a large overhead. I can see great benefit in numifying $row to find the $row_count. Contextual::Return provides this, but at a significant cost to performance.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: The trap of reference numification
by samtregar (Abbot) on Nov 11, 2005 at 21:10 UTC
    It isn't that $row is bad in some way. It really was supposed to be an ARRAY ref. I just used the wrong variable. The one I wanted was $line_num.

    Also, this is hardly the first time I've been bit by numified references. I say we should solve the problem, not swat at the symptoms.

    -sam

      Sounds like you needed Hungarian notation. Not the evil Systems notation, but the good Apps notation. Refer to http://en.wikipedia.org/wiki/Hungarian_notation for more info on the difference. FWIW, the inventor invented the Apps version, but it was mutated into the Systems version due to a poor choice of words in the original whitepaper.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
        That sounds like a cure that's worse than the disease to me. I'd prefer a less pathologically magical Perl over code full of prefixed variable names.