From: Sean O'Halpin Date: 2005-10-15T12:39:46+09:00 Subject: Re: Factory function like Array() for your own classes On 10/15/05, Dave Burt wrote: [snip] > Why not just use ..new? Why does new need an alias? It doesn't ~need~ an alias. It's just quite handy sometimes when you are creating lots of nested objects to avoid having to type new all the time. For example, in a report DSL, you could use something like: r = Report( :header => Header( :title => "My report" ), :body => Body( :rows => Query(:sql => "SELECT * FROM Supplier")) ) instead of r = Report.new( :header => Header.new( :title => "My report" ), :body => Body.new( :rows => Query.new(:sql => "SELECT * FROM Supplier")) ) Not a big gain, but in my opinion, the .new in the second example is just adding noise. It's a matter of taste I guess. Regards, Sean