[MCZ] and adding related files
Colin Putney
cputney at wiresong.ca
Sat Nov 8 23:30:27 UTC 2003
On Nov 8, 2003, at 2:35 PM, Phil Hargett wrote:
> I'm completely interested in that kind of redesign of MC; that is,
> specifically, adding more complex types of info to a Package. In
> fact, I recently wrote some code for myself that took it's inspiration
> partly from PackageInfo and partly from Aspect-Oriented Programming.
>
> The locus of MC is the package, which contains a set of classes and
> methods (e.g., extensions). In my model, an Aspect was the locus, and
> it could contain several more things than just classes and methods:
>
> --Introductions: new Classes, new methods in existing classes, new
> instance variables in existing classes, new class variables in
> existing classes, and new global variables (e.g. entries in
> SystemDictionary instance Smalltalk)
> --Pointcuts: named sets of Class / selector pairs, used as locators
> for specific methods
> --Advice: associated with one of the named pointcuts, an Advice
> contains a block of code that will be inserted into the source of the
> methods identified by the pointcut at specific joinpoints: e.g.,
> before the body of the method, after the body of the method, or around
> ("instead") of the method
> --Other aspects: allows one to aggregate and reuse multiple aspects
I'm interested in this sort of alternative code model as well, more
with regard to Traits than Aspects, but in either case I don't think it
would be too difficult to add. Your introductions correpond to MC's
existing definitions, and all you'd need is new definition classes for
Pointcuts and Advice.
The only real stumbling block is the mcz file format, which is designed
to make the code accessible to non-Monticello-users. Since our current
model of a program is closely related to the Squeak runtime, it's
isomorphic to Squeak fileouts, and mcz contains a normal fileout with
the package's source code. To deal with Traits or Aspects, we'd need a
new fileout format that could go in the mcz archive.
This relates to the recent discussion of alternate Metaclass
implementations, (sorry, can't remember whom to credit), which I found
facinating. My intuition says that for every implementation of
Metaclass, there exists a way to declaratively model programs written
for it. As long as that's the case, we can use Monticello to version
them.
Right now, Monticello can only work with ANSI Smalltalk (more or less)
programs, but there's no reason we couldn't adapt it for Traits,
Aspects, Mixins, Prototypes or whatever else people find interesting.
Colin
More information about the Squeak-dev
mailing list
|