[Seaside-dev] basicNew

Julian Fitzell jfitzell at gmail.com
Mon Sep 29 08:17:14 UTC 2008


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?

Julian


More information about the seaside-dev mailing list