[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: new block notation (was: Re: ruby-dev summary 26468-26661)
From:       Navindra Umanee <navindra () cs ! mcgill ! ca>
Date:       2005-08-06 21:46:04
Message-ID: 20050806144556.A12627 () cs ! mcgill ! ca
[Download RAW message or body]

Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
> In message "Re: new block notation (was: Re: ruby-dev summary 26468-26661)"
>     on Sat, 6 Aug 2005 00:26:17 +0900, Florian Groß <florgro@gmail.com> writes:
> 
> |Why not go with  lambda(arg-list) { body }  or  fun(arg-list) { body } 
> |or  def(arg-list) { body }  then? I think that the syntax would point 
> |out that this is more than a method that turns a block into an object 
> |and I think that it would be a simple solution.
> 
> Introducing a new reserved word possibly break existing code.  Besides
> that, there's no good candidate for a new keyword: lambda is too
> awkward, def is not sufficient since we don't define anything here,
> and I expect the name fun is used everywhere as local variable names.
> 
> "->" might appear weird at first.  But it doesn't break any code.

Just my +1 cents for Florian here.  def or even lambda both sound
great to me and feel natural to current Ruby -- the arrow thing is
just plain weird and alien to the language or concepts IMHO.

Cheers,
Navin.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic