From: Robert Klemme Date: 2003-07-04T16:54:38+09:00 Subject: Re: Using & for arrays of objects "Rudolf Polzer" schrieb im Newsbeitrag news:slrnbg987m.fb3.denshimeiru-sapmctacher@message-id.durchnull.ath.cx... > Scripsit ille �Robert Klemme� : > > "Rudolf Polzer" schrieb im Newsbeitrag news:slrnbg69ll.99k.denshimeiru-sapmctacher@message-id.durchnull.ath.cx... > > > > > class Human < Beer > > > > Hm, I find this modeling a tad bit unrealistic. > > Beer = Be-er = someone who is ^_^ > > Didn't you read the (misplaced) comment? I did but obviously this eluded me. :-) > > > i = Human.new() > > > > In fact we both made an error here: you need a factory and a helper class > > (both sub classes of Human) to create a new Human. > > Which Ruby doesn't support: an object cannot be created without using > a constructor. No OO language that I know does (maybe JavaScript), but you can have factories nevertheless. And you might hide the constructor from the public somewhere deep in the womb of the factory. > So how is the "first" object created? I guess you'll find out quite easily by looking into Ruby source code. :-) robert