Re: Cleaner syntax for .map (is there already a way, or ruby2 idea?)
- From: "David A. Black" <dblack@xxxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 14:11:06 +0900
Hi --
On Fri, 28 Oct 2005, nobuyoshi nakada wrote:
Hi,
At Thu, 27 Oct 2005 21:07:03 +0900, Trans wrote in [ruby-talk:162907]:A shorthand for:
people.every.email_addr
But I like your [*]. Hmm... I maybe able to adjust above to use [:*]
I feel your "every" much cleaner than [*].
I agree, visually, but I find both of the semantically opaque compared to people.each {|person| ... } I know that people.every could return some kind of generator or enumerator, which could then be fed "email_addr" symbolically... but it seems to conceal rather than reveal what's going on.
David
-- David A. Black dblack@xxxxxxxxxxxx
.
- Follow-Ups:
- Re: Cleaner syntax for .map (is there already a way, or ruby2 idea?)
- From: Daniel Schierbeck
- Re: Cleaner syntax for .map (is there already a way, or ruby2 idea?)
- Prev by Date: Re: Expression Evaluation Problem
- Next by Date: Re: Stuck with modules/classes/inheritance
- Previous by thread: Re: Cleaner syntax for .map (is there already a way, or ruby2 idea?)
- Next by thread: Re: Cleaner syntax for .map (is there already a way, or ruby2 idea?)
- Index(es):
Relevant Pages
|
Loading