I have some comments, to both the package implementation and the
Glamour browser. The other browser didn't work, I guess I miss some
extra package.

- I used the code below to import the existing packages into the new
model. Maybe something like this should be included on the class side
of RPackageOrganizer to have a realistic model?

        | package |
        PackageOrganizer default packages
                do: [ :info |
                        package := RPackage2 named: info packageName.
                        info classes do: [ :each | package addClassDefinition: 
each ].
                        info coreMethods do: [ :each |
                                each isValid
                                        ifTrue: [ package addMethod: each 
compiledMethod isExtension: false ] ].
                        info extensionMethods do: [ :each |
                                each isValid
                                        ifTrue: [ package addMethod: each 
compiledMethod isExtension: true ] ] ]
                displayingProgress: 'Importing'

Then I opened the glamour browser using:

        GTCoder openOn: RPackageOrganizer default

- I find it quite strange that I have to declare if a method is an
extension or not. Isn't a that obvious when looking at the defined
classes? Having two dictionaries for methods makes it extremely
difficult to move stuff around because always 4 separate cases need to
be handled.

- The fact that compiled methods are stored in the model is very
dangerous. You might hold onto compiled methods that have long been
replaced with other ones. Just by playing a bit with the model I run
into that situation (I don't know how). I think just keeping the
selector internally would be much safer and solve all kinds of
troubles (exactly like this is done for the classes). You'll have to
check anyway if the method is still present when you iterate over the
methods. A single use of #doSilently: (and there are lots of them in
the image) can completely screw up the complete package model.

- The browser displays nicely the extended classes, but for the
methods I don't see the protocols and the complete set of selectors
implemented. I think these things should be part of the browser,
otherwise we don't see if the package model can answer these queries
quick enough.

- The browser displays extension methods on both instance and
class-side. When browsing an extended class, the extensions are not
displayed.

That's it for the moment. I see a cool model emerging :-)

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to