Registries
ducasse
ducasse at iam.unibe.ch
Tue Nov 4 21:04:02 UTC 2003
Avi
could you describe a schematic use of registry that I digest it
completely? In particular I want to see
the different with the FileList registration. With the FileList a tool
has the responsibility to say I'm here and interested in X. Then the
filelist or any other filebased related tools can query which tool is
capaable to dealing with Y or X.
Apparently I'm too tired, I missed the difference.
Stef
>> 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... ;)
I'm always skeptical when the solution just based on a language
extension.
Stef
More information about the Squeak-dev
mailing list
|