Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Sounds like your boss is "clever" in about the same way that I'm "lazy". Which is to say, in exactly the opposite way to the global definition. I do a lot of work to maintain my laziness, and your boss is myopic in his cleverness. Sort of like being "penny wise, pound foolish." Being clever in small spurts while being wholly unclever for the rest of the code is not clever in the global sense. I think we're almost completely in agreement on the ideas, even though we'll disagree as to the semantics. That's neither clever nor idiomatic. At least not in "Tanktalus' dictionary." Just because it can be done in Perl, and just because it may be unique to Perl, does not idiomatic make. (In this case, using global references is not unique to perl - C++, for example, can use "int& reference = some_other_variable;".) There are lots of features to perl - your boss is just using the most obscure in the least intended ways. That's not idiomatic, that's idiotic. (Well, that may be harsh, but I like how I just removed the "ma" from "idiomatic"... ;-}) To me, more idiomatic is what you said: use %$x instead. Mixing sigils for dereferencing is perlish to me. And I can't think of another language that does this. And it's still readable, maintainable, and flexible. Granted, convincing your boss of that is an entirely different story. In reply to Re^5: seeds...
by Tanktalus
|
|