Extension methods, extension classes and extension packages
Samir Saidani
saidani at info.unicaen.fr
Fri Mar 25 17:57:24 UTC 2005
Hi,
I like the feature "extension" in Monticello because I can in the
package I working on add easily some fine tuning in other classes or
category I need for this package.
But whereas it's straightforward thanks to PackageInfo when I would
like to tune an existing class to make it usable for a package, I need
sometimes to tune an existing package/category (I identify both in the
following) to add some useful functionalities. For instance, I can
tune some classes like Set by adding methods extensions, and I need
also to tune the Collection-Unordered category by adding classes like
DictionaryWithDefault.
Presently, in PackageInfo, there is two methods called
extensionMethods and extensionClasses which names puzzled me for what
I want to do :
extension methods : this is methods extending the instance side of a
current class
extension classes : this is methods extending the side class of a
current class
I propose the following :
extensionInstanceMethods : this is methods extending the instance side of an
existing class
extensionClassMethods : this is methods extending the side class of an
existing class
and add
extensionCategoryClasses : this is classes extending an existing
package
For extension methods, there is the convention to prefix the protocol
method with an * and the modifying package :
*squeakenh-collections-accessing.
In a same way, I propose the following convention :
Collections-Unordered-*SqueakEnh-Collections
(or *<ModifyingPackage>-<Section>-<PackageName>-<Section> but for
browser displaying categories in alphabetic order, the other one would
be more convenient)
A view in a browser would be
*[+] <PackageName> if it is an extension
For instance, with no extensions
[-] Collections
|
|___Unordered
with an extension
*[-] Collections
|
|___ [+] Unordered
where when unfolding Unordered will make appear the package-section
modifying this package.
(Collections-Unordered-*SqueakEnh-Collections)
Before digging into PackageInfo code, what do you think about this
kind of feature ?
Regards,
Samir
Note : it would be great to have a browser with a folding/unfolding
feature for category !
--
Samir SAIDANI
PhD Student in CS / Doctorant en informatique web : http://www.info.unicaen.fr/~saidani
Universite de Caen - Laboratoire GREYC tel : 02-31-56-74-30
Equipe MAD - Campus II - 14032 Caen Cedex fax : 02-31-56-76-30
More information about the Squeak-dev
mailing list
|