From: Ron Fox Date: 2008-11-04T21:53:33+09:00 Subject: Re: Constructors exiquio wrote: > Robert Klemme wrote: >> On 03.11.2008 17:11, Stefano Crocco wrote: >> >>> I think the closest you can get to the Java syntax is this: >>> >>> def new o, *args >>> o.class == Class ? o.new(*args) : o >>> end >> Can someone please explain to me what we gain by doing this? >> >> robert > > I didn't mean to imply that Ruby needs this. It doesnt. I think that > JavaScript is a very fascinating language and I am slowly trying to > implement core JavaScript in Ruby, Why? If purely as a learning project fine.. but remember language a is not language b no matter how much you try to coerce it to be. Idioms are different, patterns are different and so on. another enjoyable language I am > trying to learn. Hence the new operator. Just for the experience. -- Ron Fox NSCL Michigan State University East Lansing, MI 48824-1321