[Seaside-dev] basicNew
Philippe Marschall
philippe.marschall at gmail.com
Sat Oct 4 21:49:32 UTC 2008
2008/9/29, Julian Fitzell <jfitzell at gmail.com>:
> Seaside-Core-pmm.267.mcz
> - use #new instead of #basicNew for WACallbackRegistry, using
> #basicNew has already lead to interesing bugs in other places
>
> I always thought the pattern was:
>
> Foo class>>bar: param
> ^ self basicNew initializeWithBar: param
>
> Foo>>initializeWithBar: param
> self initialize.
> bar := param
>
> I guess calling new instead of basicNew and not call #initialize from
> #initializeWithBar: also works, but means you don't have control over
> when (or if) #initialize gets called. I have to admit that the whole
> initialization pattern feels a bit ugly both ways though. Is this the
> preferred pattern throughout now?
So after all this talk, what is the conclusion? I really think that anything that subclasses WAObject absolutely must receive #initialize or else it should subclass Object. I can live with anything that satisfies this and would prefer to have it applied uniformly.
Since Lukas and Julian wrote a lot of code in question (I just stumbled upon WACachePlugin) what is your opinion?
Cheers
Philippe
More information about the seaside-dev
mailing list