Sean O'Halpin
3/27/2008 8:25:00 PM
On Thu, Mar 27, 2008 at 6:51 PM, Martin DeMello <martindemello@gmail.com> wrote:
>
> Tangentially, why did the trick of defining methods with the same name
> as classes, to delegate to Class.new, fall out of favour?
>
> tripler = Transformer.new {|val| val * 3}
>
> would read more nicely as
>
> tripler = Transformer {|val| val * 3}
>
> with def Transformer(x); Transformer.new(x); end
>
> I remember it being a commoner practice a few years ago.
>
> martin
>
Some of us oldies still use it. But I seem to remember some people
objected last time I suggested it (ruby-talk[160664]).
Regards,
Sean