in reply to Perl's warts

What really got me was when the author presented the problem of implicit variables, which can get rather messy in the wrong hands. However, his example of printing the first 10 digits, well 1 - 10, was far from complete. He completely left out this one:
print foreach (1..10);
which totally trumps being "two shades removed from perfectly clear" - show that code next to a C-style loop and ask people on the street which is easier to comprehend.

On the other side, I find I do have to step back and remember who I was before I knew *some* Perl. That person was intrigued by Perl, a little scared, but its warts were a 'turn on' to me, not a critism.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

Replies are listed 'Best First'.
Re: (jeffa) Re: Perl's warts
by MeowChow (Vicar) on Mar 21, 2001 at 22:43 UTC
    And for that matter, it could have simply been:
    print 1..10;
    I find the article to be quite misleading on the subject of implicit variables:
    Critics pounce here, and say that this third example is exactly what gets us into trouble with Perl. Defenders point back to the libertarian argument for self-discipline: "don't do that". But the fact is, programmers do do that, regularly. Because they can.
    "Defenders" of Perl would never say "don't do that"! Implicit variables are, ultimately, a strength of Perl. The fact that code is not immediately apparent and obvious to someone who's never troubled themselves to learn the language is not in any way an argument against it.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print