in reply to Polysignant variables

In general, I think it needlessly invites trouble in terms of readability and maintainability to change types. It'd be pretty easy for another programmer (and, of course, a few months later that could be you) to see that some given scalar variable is a hashref, say, pass it as such... and waste time tracking down a puzzling error because it wasn't.

If one really thought some bit of code really called for it, commenting it'd probably be prudent.

Replies are listed 'Best First'.
Re: Re: Polysignant variables
by jplindstrom (Monsignor) on Aug 06, 2001 at 15:59 UTC
    And if the concept is so complicated it needs a comment, why not introduce a properly named variable for each case and be done with it? :)

    The cost of a few more declared variables is low compared to the advantages of code clarity.

    /J