Keep It Simple, Stupid | |
PerlMonks |
Re^7: On Backwards Compatibility and Bareword Filehandles (Orthogonality)by LanX (Saint) |
on Jul 20, 2020 at 01:24 UTC ( [id://11119532]=note: print w/replies, xml ) | Need Help?? |
I spend much time training colleagues in Perl. I'm pretty happy when they understood scoping rules and follow the basics of declaring with my. And believe me, nobody there thought much about using package before I started there. There is simply not much room to tell a beginner about all the specialties of a package scoped bareword, which needs to be treated with local, the internals of type-globs and how to pass them around as reference with \*FH . Yes Perl has many ways to do it and it's impressive how I can always come up with a nifty trick to fix the sins of a 15 year old code base. But orthogonality rules, they don't need to learn how to use a baseball bat to drive a nail into the wall, if there is a hammer called my $FH and they already learned to use that hammer with many other nails ... And there is no issue with "backwards compatibility" whatsoever!
Cheers Rolf
In Section
Meditations
|
|