P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
When I first encountered the idea, presented in Conway's
Perl Best Practices, that use English be
a best practice, I just thought it another of theDamien's
attempts to enable novice Perlers. Many of those practices
might rankle a more experienced Perler, but I see the sense of
them and only fault the idea if it creates a bar to advancing
the skill of the crew.
I don't see using a different name for something as a loss or gain of skill. I scarcely ever mentally verbalize $_ and such, so having a precise and formal name in front of me would seem to be an asset. But the use English practice continued to seem artificial to me and I could not formulate a reason. What made it curious is that I don't use puncish variables much--it was a small issue: why do I resist using English? but it persisted. I'm pretty comfortable around these: @_, $_, $/, $., $|, $/, $0, $@, and $,. And I think I'd usually recognize: $`, $', $!, $$, $\, and $^O. There will need to be powerful contextual hints for me to know, on sight, most of the others. Well, I eventually clued to why puncish is beautiful. And it was all about how puncish vars help a coder who is not well versed with them. When I read $LIST_SEPARATOR, I may be confused as to its derivation; perhaps there is some parsing or data packing happening in user code. When I see the equivalent $", I will know that perldoc perlvar has the definition. The beauty of puncish variables is in the ease with which they can be recognized as perlvars. There is an elegance to the namespace. When I do need to know what $< is, I'll know right where to look.
Be well, In reply to An Apology for Puncish by rir
|
|