From: Gennady Date: 2004-01-15T08:00:01+09:00 Subject: Re: Why initialize? Ralph Mason wrote: > One thing I have often wondered is why the ruby constructor isn't called > new? > > In my laziness I would rather type new than initialize. > > It seems clearer than initialize, and appears to work just fine. > Perhaps both could be supported? > > What thoughts? > Ralph > > > > class Foo > def new > puts "Foo.new" > end > def Foo.new > x=super > x.new > x > end > def bar > puts "Foo:bar" > end > end > > Foo.new().bar > Search ruby-talk archives at http://www.ruby-talk.org/ruby/ruby-talk/index.shtml for many discussions on the issue. Gennady.