[Pharo-project] NewClassOrganizer
Hi all, I'm looking at the NewClassOrganizer package. Is that part of the system reimplementation effort ? In it, I'm worried by ClassOrganization>>addCategory: aProtocolName before: aUselessArgument. I want to be able to fix the ordering of protocols when I develop (it's more to my taste, as an old-timer, to have usually initialization / instance creation on top of the protocol list, and private at the bottom... Alphabetical ordering of protocols is far less satisfying, and an implementation which force an internal reordering contrary to my whishes would be problematic). Thierry
On 2012-09-09, at 12:31, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
Hi all,
I'm looking at the NewClassOrganizer package. Is that part of the system reimplementation effort ?
In it, I'm worried by ClassOrganization>>addCategory: aProtocolName before: aUselessArgument.
I want to be able to fix the ordering of protocols when I develop (it's more to my taste, as an old-timer, to have usually initialization / instance creation on top of the protocol list, and private at the bottom... Alphabetical ordering of protocols is far less satisfying, and an implementation which force an internal reordering contrary to my whishes would be problematic).
Ordering of protocols should happen in the Browser not in the model. Protocols are simple dictionary entries, the old implementation simply did not want to use dicts for performance / space reasons. I doubt that we will add explicit ordering to protocols...
________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : dimanche 9 septembre 2012 12:48 Ã : Pharo-project@lists.gforge.inria.fr Objet : Re: [Pharo-project] NewClassOrganizer
Ordering of protocols should happen in the Browser not in the model.
Hum, it looks like to save a few lines there, it's gonna cost a few thousands lines and caching complexity in the Browser.
Protocols are simple dictionary entries, the old implementation simply did not want to use dicts for performance / space reasons.
I doubt that we will add explicit ordering to protocols...
Then the new implementation looks worse than the previous one, from a GUI point of view in addition to the performance / space ones. Thanks for the warning. Thierry
On 2012-09-09, at 13:18, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : dimanche 9 septembre 2012 12:48 Ã : Pharo-project@lists.gforge.inria.fr Objet : Re: [Pharo-project] NewClassOrganizer
Ordering of protocols should happen in the Browser not in the model.
Hum, it looks like to save a few lines there, it's gonna cost a few thousands lines and caching complexity in the Browser.
I doubt that you'll need any caching there, for any given protocol finding the proper methods should be O(1), so the only thing that's left is ordering the protocol. - define a global ordered collection of predefined categories which will be sorted first - sort the rest alphabetically... so that's an O(n) lookup overhead for the all the entries. given that there is hardly any class defining 100 protocols you can redo that calculation as often as you want...
Protocols are simple dictionary entries, the old implementation simply did not want to use dicts for performance / space reasons.
I doubt that we will add explicit ordering to protocols...
Then the new implementation looks worse than the previous one, from a GUI point of view in addition to the performance / space ones.
not at all... the old categories are a big mess without any documentation => nobody will every maintain that and as mentioned above, the only trade-off is space, which honestly you cannot complain about unless we hit something like a 300MB boundary like Eclipse...
You are a very directive kind of person, when it comes to thoses things... If a user want it classified his way, who am I to change his ordering ? No, the solution isn't yet another level of ill-defined "pattern matching" to try to get that result. Smalltalk has, from the beginning, been able to show good practice by letting it's developpers set well though-out conventions themselves, and by giving them the freedom to do so (maybe not consciously in some cases, but still). Regressing on that isn't good. Well, I personnaly will rebuilt yet another RPackage like system to get what I need, obviously. By the way, have you noticed that on some systems, Pharo 2.0 starts to feel slow to use ? Thierry ________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : dimanche 9 septembre 2012 13:25 Ã : Pharo-project@lists.gforge.inria.fr Objet : Re: [Pharo-project] RE : NewClassOrganizer On 2012-09-09, at 13:18, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
________________________________________ De : pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] de la part de Camillo Bruni [camillobruni@gmail.com] Date d'envoi : dimanche 9 septembre 2012 12:48 Ã : Pharo-project@lists.gforge.inria.fr Objet : Re: [Pharo-project] NewClassOrganizer
Ordering of protocols should happen in the Browser not in the model.
Hum, it looks like to save a few lines there, it's gonna cost a few thousands lines and caching complexity in the Browser.
I doubt that you'll need any caching there, for any given protocol finding the proper methods should be O(1), so the only thing that's left is ordering the protocol. - define a global ordered collection of predefined categories which will be sorted first - sort the rest alphabetically... so that's an O(n) lookup overhead for the all the entries. given that there is hardly any class defining 100 protocols you can redo that calculation as often as you want...
Protocols are simple dictionary entries, the old implementation simply did not want to use dicts for performance / space reasons.
I doubt that we will add explicit ordering to protocols...
Then the new implementation looks worse than the previous one, from a GUI point of view in addition to the performance / space ones.
not at all... the old categories are a big mess without any documentation => nobody will every maintain that and as mentioned above, the only trade-off is space, which honestly you cannot complain about unless we hit something like a 300MB boundary like Eclipse...
On 2012-09-09, at 13:39, GOUBIER Thierry <thierry.goubier@cea.fr> wrote:
You are a very directive kind of person, when it comes to thoses things... If a user want it classified his way, who am I to change his ordering ?
You got me wrong there, I am talking about a user defined / preference dict. It's like choosing your preferred font. Of course this solution is very simplistic only holding up to a single global order. The other solution might be to simply replace the Dictionary in the new class organizer by something like an OrderedKeyDictionary plus a Nautilus plugin, DONE If you want my very personal opinion, I think it's not really helpful to have anything but alphabetic sorting. I use the new shortcuts in 2.0 to simply jump to the category I want, that saves me some couple of 100ms visual perception time on each selection.
No, the solution isn't yet another level of ill-defined "pattern matching" to try to get that result. Smalltalk has, from the beginning, been able to show good practice by letting it's developpers set well though-out conventions themselves, and by giving them the freedom to do so (maybe not consciously in some cases, but still). Regressing on that isn't good. Well, I personnaly will rebuilt yet another RPackage like system to get what I need, obviously.
I don't see any problem there.
By the way, have you noticed that on some systems, Pharo 2.0 starts to feel slow to use ?
in regard to what? I would say if you do a DeltaSlowness / AddedFeaturesIn2.0 you end up with something close to 0...
participants (2)
-
Camillo Bruni -
GOUBIER Thierry