From: Michael Neumann Date: 2004-08-06T01:50:56+09:00 Subject: Re: Macros in Ruby Ara.T.Howard wrote: > On Fri, 6 Aug 2004, Gavin Sinclair wrote: > >> On Friday, August 6, 2004, 12:11:27 AM, Ara.T.Howard wrote: >> >>> perhaps a shorthand: >> >> >>> lambda{ puts 'lambda' } => Proc:0xb74041a0 >>> &{ puts 'lambda too' } => Proc:0xb74041a1 >> >> >>> i'm probably missing something, but i don't think the syntax '&{' occurs >>> anywhere now and '&' is already synomynous with blocks/procs/etc. >> >> >> >> If you must have a shortcut, I think 'L' makes more sense. >> >> L { puts 'lambda' } => Proc:0xb74041a0 > > > > but 'L' is a valid identifier: > > ~ > cat a.rb > L = 42 > L { puts 42 } > > ~ > ruby a.rb > a.rb:2: undefined method `L' for main:Object (NoMethodError) > from a.rb:2 > > problematic. how about "fn" or "fun"? Only one character longer than "&" and IMO easier to read (especial for ML programmers ;-) Regards, Michael