Registries
Avi Bryant
avi at beta4.com
Tue Nov 4 20:48:00 UTC 2003
On Nov 4, 2003, at 12:28 PM, ducasse wrote:
> Hi adam
>
> I had a brief look and this is a good start. I really think that we
> need this kind of architectural
> support to avoid all the hardcoded mess. I have the impression that
> the annotations are not really required we can simply use the class
> initialize way for now as we do it in FileList.
Stef, you may well be able to come up with another solution than
annotations, but class initialize methods are not it, for a very simple
reason: you can only have one #initialize method per class. This means
that:
- I can't extend your package with a new registration without modifying
one of your methods
- Two patches both adding registrations to the same package will always
conflict
- The registrations cannot go in the same method category as related
methods, especially if there are multiple kinds of registrations for
the same class
And probably lots of other problems along the same lines.
We could of course allow multiple #initialize methods, but then we'd
have to mark them as such, and how would we do that? Well, we could
use method annotations... ;)
More information about the Squeak-dev
mailing list
|