On Dec 23, 2009, at 1:03 18PM, Stéphane Ducasse wrote:

> 
> On Dec 23, 2009, at 12:35 PM, Henrik Johansen wrote:
> 
>> 
>> On Dec 23, 2009, at 12:30 51PM, Alexandre Bergel wrote:
>> 
>>>> Ok but in that case I do not tests the behavior on class
>>>> But this is an idea (Now I generate all the classes on the fly so I  
>>>> would have
>>>> to compile all the methods).
>>> 
>>> In that case, you cannot test your behavior on existing class. Note  
>>> that you can also in the setUp method recompile  
>>> ClassDescription>>package and reinstall the original version in  
>>> tearDown.
>>> 
>>> Cheers,
>>> Alexandre
>> And please remember to use compileSilently: if doing this as part of tests ;)
> 
> :) Yes I know this is major speed up.

I was thinking more of the annoyance it poses when recovering lost changes 
after you've ran tests, but sure, the performance boost is nice to have as well 
:)

Btw, I took a short look at the RPackage code, looked to me like quite a few of 
the add / addNamed: methods could be rewritten so one uses the other.
Eases maintanance if the actual adding is only defined in one place :)

Some API inconsistencies I'd like to see fixed:

- for adding classes, if you pass in  metaclass, it will add the class.
- for adding classes by name, if you pass in a metaclass name, it will raise an 
error.

- IIRC, atm it's sort of mix and match of what sort of argument is allowed for 
the different things you can add by name.
- define a consistent expected argument type for the name: methods. Either 
require them to implement the asSymbol method, or require them to be symbols. 

One last question - As far as I can see, there's no automatic removal of 
definitions from other packages if they exist when you add something to a 
package. 
Is this supposed to be the resonsibility of the tools using them?
Either way, please, please, please, also implement Announcements for the 
different kind of changes.

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

Reply via email to