That "three line patch" is one of thousands that bloats Perl.
If an optimization that only takes three lines "bloats" Perl,
then you must have been an unhappy camper ever since Perl 5.000
came out. If you already consider this bloat, how do you feel
about statement modifiers? What about having unless?
What about short cuts like +=? Or having two kinds of
for/foreach, a while, and an until? Shouldn't that be all bloat
because we have goto?
It isn't as if this sort of practice is un-Perl. After all, Perl is
the language that encourages people to use operations like "tr/a/a/"
to count the number of a's in a string.
Funny that you bring this one up. For a long time, "tr/a/a/" modified
the string it was working on (replacing every 'a' with an 'a'). Noone
considered that bad style. And still, after a couple of years, this
operation was also optimized. Do you consider that 'bloat' as well?
I use Perl because it is practical. I don't use it to ensure that
non-Perl-familiar members of the community will be unable to understand
You must have a limited view of the world of programming languages.
The non-Perl world is bigger than Java. There are languages in which
map like constructs *are* the way to iterate over an array. In fact,
I know more languages that use map like constructs to iterate over
an array (or list) than I know that use 'for (LIST)'. And outside of
Perl, I do not know any that uses 'EXPR for LIST'.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||