On Fri, Feb 12, 2010 at 3:33 PM, Stéphane Ducasse <stephane.duca...@inria.fr > wrote:
> Hi Peter > > there is no stupid question! Only people afraid to ask. > Stupidity is when you ask three times the same question. > In this list we can ask all the stupid question we want. > > So thanks for taking the risk :) > > automatic initialize= calling automatically initialize when calling new > > avoid to have to all the time write > > Box class>>new > ^ super new initialize ; yourself > > kind of desastrous for newbies. You know after two lectures you have to > nearly explain metaclasses, and deep super + method lookup... > > In Squeak 3.7 we got a chance to have an agreement to have > > Behavior>> new > ^ self basicNew initialize > Object>>initialize > ^ self > and some shortcuting behavior on array to speed up the system. > it makes so many things much much nicer. > > > > On Feb 12, 2010, at 3:15 PM, Peter Hugosson-Miller wrote: > > > On Fri, Feb 12, 2010 at 10:30 AM, Stéphane Ducasse < > stephane.duca...@inria.fr> wrote: > > another point, what about automatic initialize? > > At one point in the past VW (eliot) was really for introducing it in VW > since it would not cost > > anything in presence of the JIT. > > Dolphin people did it on Model but they told me that if they could they > would remove it. > > and this is a really important change to lower the entry level and burden > of newcomers. > > > > Now because of "compatibility" we have to code without it for me this is > a drawback. > > > > I know this is probably a stupid question, but rather than miss something > important, I'll take that risk :-p > > > > What do you mean by "automatic initialize"? > > > > -- > > Cheers, > > Peter > > _______________________________________________ > > Pharo-project mailing list > > Pharo-project@lists.gforge.inria.fr > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > Pharo-project@lists.gforge.inria.fr > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > Thanks, Stef, Cesar So you're still talking about having the message #initialize being explicitly sent from within the #new method, right up there on Behavior. I definitely like this arrangement: one of the first things I always do is to implement #new that way, as far up as I can in the domain object hierarchy. For a moment there I imagined you meant some "behind-the-scenes-magic", and that the #initialize send would not be explicit anywhere in the code. Now I can relax again ;-) -- Cheers, Peter
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project