develooper Front page | perl.perl5.porters | Postings from February 2011

Re: perldoc improvements for map

Thread Previous | Thread Next
From:
Christian Walde
Date:
February 13, 2011 02:10
Subject:
Re: perldoc improvements for map
Message ID:
op.vqt6jku91fclwf@xenpad.guest.traffics.de
On Sun, 13 Feb 2011 08:39:14 +0100, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:

> * Abigail <abigail@abigail.be> [2011-02-12 22:35]:
>> Please, let's try to avoid "not recommended" as much as
>> possible. I'm already spending way too much time fighting
>> people who object to code because someone recommends against
>> it, and it's not only taken as gospel, but as a weapon. PBP has
>> already done way too much damage; unless there are very good
>> reasons to do so, I think the "official" documentation should
>> be very selective in recommending one style over the other.
>>
>> Personally, I never use "map EXPR, LIST", but that's a personal
>> choice. If there are *objective* reasons to use one style over
>> the other; state them, and let the reader draw his own
>> conclusions.
>
> Would you accept something like “the `map { BLOCK } LIST` form is
> generally considered more readable for non-trivial expressions”?

I do not think it is a good thing for a technical documentation to start talking about style concerns. I'd prefer it if it would stick to concerns that actively deal with what the machine actually executes.

That said, if it makes people happier to have it in there, i'd personally like this wording better: "For complex expressions the `map { BLOCK } LIST` form can be less confusing than the the `map EXPR, LIST` form." I think that explains the reasoning better, avoids weasel words, and is easier to read, which non-native english speakers will appreciate.

-- 
With regards,
Christian Walde

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About