Re: finding common words

From: Uri Guttman (uri_at_stemsystems.com)
Date: 02/24/04


Date: Mon, 23 Feb 2004 23:06:27 GMT


>>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:

  TvP> When I submitted this patch a couple of months ago, I expected it to go
  TvP> into blead. But as I see right now, it already went into 5.8.1. That
  TvP> means that the map-returns-list-in-void-context argument no longer
  TvP> counts for recent perls.
>>
>> i disagree. see my other post and anno's response.

  AS> What's to disagree about, Uri? Tassilo doesn't claim other
  AS> arguments don't count. The map-returns-list-in-void-context one
  AS> certainly doesn't anymore, but that was never your main case, if I
  AS> understand you.

i was never really upset about the efficiency issue which has been
changed. i didn't like the semantic problem of throwing away the list
that map is supposed to make. now the docs will say there is no
generated list in void context so that may be harder to argue. but i
still say that map tells the reader a list is being made so look for
it. for modifier doesn't make such a list. someone (possibly abigail)
also pointed out a subtle difference between map and for, map provides
list context and for provides void context to their expression. that can
be worked around IMO.

i just teach that you code to refect your design and not just implement
it. using map in void context is an implementation that generally
doesn't refect your design IMO.

but we should end this thread now. i won't convert any others here and i
won't change my mind on why i don't like it.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


Relevant Pages

  • Re: finding common words
    ... > doesn't refect your design IMO. ... I've never actually used a map in void context ...
    (comp.lang.perl.misc)
  • Re: Style question: map versus foreach
    ... @@> But could you give an objective reason why foreach is "clearer" than ... it couldn't have been in void context. ... There are many Perl ...
    (comp.lang.perl.misc)
  • Re: Style question: map versus foreach
    ... Context rules in perl. ... There is a clearer way to do map in void context: foreach. ...
    (comp.lang.perl.misc)
  • Re: Style question: map versus foreach
    ... __ Abigail wrote: ... Context rules in perl. ... the fact than in older versions of Perl map was implemented ... __ map's (in void context) can be zillions faster. ...
    (comp.lang.perl.misc)
  • Re: Style question: map versus foreach
    ... There is a clearer way to do map in void context: foreach. ... the desired contexts being different, it makes sense to me that one ...
    (comp.lang.perl.misc)