From: "Ben Tilly" <[EMAIL PROTECTED]>
   Date: Wed, 12 Sep 2007 06:40:40 -0700

   On 9/11/07, Bob Rogers <[EMAIL PROTECTED]> wrote:
   >    From: "Ben Tilly" <[EMAIL PROTECTED]>
   >    Date: Tue, 11 Sep 2007 14:18:57 -0700
   >
   >    On 9/11/07, Palit, Nilanjan <[EMAIL PROTECTED]> wrote:
   >    [...]
   >    > > It is very bad form to use map as a looping construct.
   >    >
   >    > Can you elaborate why it is a bad form: readability, performance, ...?
   >    > Just want to understand the underlying reason. (To me, both the for &
   >    > map inline forms appear to be the same readability & performance 
wise.)
   >
   >    Readability is the big difference . . .
   >
   >    . . . Furthermore you're demanding
   >    more from your readers than you need to.  Anyone who speaks English
   >    (or who knows a couple of computer languages) can guess what a for
   >    loop does.  But only people who know Perl will understand what map
   >    does.
   >
   > Am I reading this right?  Are you actually defending the lowest common
   > denominator of language design?  The paragraph above seems tantamount to
   > saying,

   Not exactly.  I'm saying that *all else being equal*, make things as
   simple as possible.

Fair enough.  I don't think that's quite what you said, but perhaps I
took your statement to be more general that you intended.

   >         Perl has some nice functional programming features, but don't
   >         use them, because you might confuse people who only know
   >         stupider languages.

   All else is not equal in that case. :-)

   That said, know your audience.  Using functional techniques in Perl
   should be a deliberate decision.  In many programming groups, I'd
   never use them because the others couldn't maintain that code.

That's pretty sad.  After all, "map" is in "perlfunc" -- you don't even
have to "use" anything, much less install something from CPAN.  So
normally I would pounce on any such opportunity to enlighten my
colleagues.  But I assume you know *your* audience in this case . . .

                                        -- Bob
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to