From: Meinrad Recheis Date: 2008-05-26T23:48:44+09:00 Subject: Re: [PATCH] lambda with normal block syntax ------=_Part_3398_22438997.1211813360157 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, May 26, 2008 at 4:14 PM, Dave Thomas wrote: > > On May 26, 2008, at 8:54 AM, Yukihiro Matsumoto wrote: > >> "trouble with recognition"? I thought they hated the -> mark, mostly >> because it's different from lambda symbols (and syntax) in other >> languages (except for Perl6). I assumed those hatred will decrease >> once they used to the new syntax. But I didn't recognized they had >> recognition problem. > > My personal experience is that I don't find it a natural notation: when I > see ->, I don't immediately think 'block coming'. Instead, I think > 'pointer', 'member access', or something similar. So, for me, it really is a > 'cognition' issue (so I guess the second time it's recognition). > > You asked people to try the patched syntax that allows > > meth {|a| a+1}, {|b| b*2} > > I think that this particular syntax is a lot less obtrusive, and a lot > easier to recognize, than > > meth -> a { a + 1}, -> b { b * 2 } > > The first one is obviously a couple of blocks: that's what I read when I see > {|a| ...}. I second this. also, from the standpoint of cognition it must be said that -> will allways be recognized by most people as a binary operator where something is pointing or assigned to something. There is a good example that illustrates why such a cognitive misconception is most disturbing: (non plain text mail reader required to see the colors) try to read and pronounce these words as fast es possible: *black blue green orange yellow purple red black **orange **green **black blue ** purple** yellow black **red** *you will notice that the upper line can be read much faster than the lower line because of the mismatch of color perception and meaning of the words in the lower line. so even if we all get used to the syntax the mismatch of the meaning of -> (lambda) and the general recognition (pointer/assignment) will always be disturbing for fast perceiving of ruby code. > > Please, please consider adding both these patches into 1.9. > bike shed or not, please seriously consider it. -- henon ------=_Part_3398_22438997.1211813360157 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, May 26, 2008 at 4:14 PM, Dave Thomas <dave@pragprog.com> wrote:
>
> On May 26, 2008, at 8:54 AM, Yukihiro Matsumoto wrote:
>
>> "trouble with recognition"?  I thought they hated the -> mark, mostly
>> because it's different from lambda symbols (and syntax) in other
>> languages (except for Perl6).  I assumed those hatred will decrease
>> once they used to the new syntax.  But I didn't recognized they had
>> recognition problem.
>
> My personal experience is that I don't find it a natural notation: when I
> see ->, I don't immediately think 'block coming'. Instead, I think
> 'pointer', 'member access', or something similar. So, for me, it really is a
> 'cognition' issue (so I guess the second time it's recognition).
>
> You asked people to try the patched syntax that allows
>
>  meth {|a| a+1}, {|b| b*2}
>
> I think that this particular syntax is a lot less obtrusive, and a lot
> easier to recognize, than
>
>  meth -> a { a + 1}, -> b { b * 2 }
>
> The first one is obviously a couple of blocks: that's what I read when I see
> {|a| ...}.

I second this. also, from the standpoint of cognition it must be said that  ->  will allways be recognized by most people as a binary operator where something is pointing or assigned to something. There is a good example that illustrates why such a cognitive misconception is most disturbing: (non plain text mail reader required to see the colors)

try to read and pronounce these words as fast es possible:

black     blue     green     orange    yellow     purple     red     black
orange  green    black      blue        purple     yellow     black    red

you  will notice that the upper line can be read much faster than the lower line because of the mismatch of color perception and meaning of the words in the lower line.

so even if we all get used to the syntax the mismatch of the meaning of -> (lambda) and the general recognition (pointer/assignment) will always be disturbing for fast perceiving of ruby code.

>
> Please, please consider adding both these patches into 1.9.
>
bike shed or not, please seriously consider it.
-- henon

------=_Part_3398_22438997.1211813360157--