Hi Guys,
Why don't you do something more focused on the long term and don't you change the Smalltalk compiler with namespaces?
I don't think it should be that hard since each class already belongs to a category. Each category could instead be a dictionary from where the compiler could find classes that are mentioned in the class source.
This has worked wonders in Java (classes inside packages). This way classes' names can be repeated ad eternum without generating collisions or otherwise polluting excessively the name space.
So for example:
FAMIXAssociation subclass: #FAMIXInvocation instanceVariableNames: 'sender receiver receiverSourceCode signature candidates' classVariableNames: '' poolDictionaries: '' category: 'Famix-Core'
Would be instead:
Association subclass: #Invocation instanceVariableNames: 'sender receiver receiverSourceCode signature candidates' classVariableNames: '' poolDictionaries: '' category: #FamixCore
Then the category would be an index in the SystemDictionary:
SystemDictionary at: #FamixCore put: Category new.
(SystemDictionary at: #FamixCore) belongingClassList add: #Invocation "this should be done automatically by the subclass: method above"
(SystemDictionary at: #FamixCore) referencedClassList add: ... "classes that are referenced by classes belonging to category #FamixCore"
What do you think?
Cheers, Guillermo.
Message: 1 Date: Mon, 27 Sep 2010 22:00:33 +0200 From: Tudor Girba tudor.girba@gmail.com Subject: [Moose-dev] Re: Class renaming in Moose Algos Graph To: Moose-related development moose-dev@iam.unibe.ch Message-ID: C912A83B-6BDC-4775-AC26-CE2DBC5540AE@gmail.com Content-Type: text/plain; charset=us-ascii
Hi Simon,
These classes should be called MAlgo (or MAL ?). I started to do that a while ago, but apparently I forgot to commit this change.
Cheers, Doru
On 27 Sep 2010, at 19:42, Simon Denier wrote:
On 27 sept. 2010, at 18:17, Lukas Renggli wrote:
Please note that the MA* (with an uppercase $A) prefix is already taken by Magritte. Ma* (with a lowercase $a) is taken by Magma, if I remember correctly they renamed their classes at some point a long time ago to avoid the conflict with Magritte.
It would be really cool to have namespaces. The recent issue on MA vs Ma vs Mal remainded us to think about a long term solution. The most difficult things on this are (i) to keep backward compatibility and (ii) make all the tools aware of namespaces.
What happened with Squeak 3.3 clearly shows that you cannot manage your namespaces in an inspector.
Alexandre
On 28 Sep 2010, at 09:16, Guillermo Schwarz wrote:
Hi Guys,
Why don't you do something more focused on the long term and don't you change the Smalltalk compiler with namespaces?
I don't think it should be that hard since each class already belongs to a category. Each category could instead be a dictionary from where the compiler could find classes that are mentioned in the class source.
This has worked wonders in Java (classes inside packages). This way classes' names can be repeated ad eternum without generating collisions or otherwise polluting excessively the name space.
So for example:
FAMIXAssociation subclass: #FAMIXInvocation instanceVariableNames: 'sender receiver receiverSourceCode signature candidates' classVariableNames: '' poolDictionaries: '' category: 'Famix-Core'
Would be instead:
Association subclass: #Invocation instanceVariableNames: 'sender receiver receiverSourceCode signature candidates' classVariableNames: '' poolDictionaries: '' category: #FamixCore
Then the category would be an index in the SystemDictionary:
SystemDictionary at: #FamixCore put: Category new.
(SystemDictionary at: #FamixCore) belongingClassList add: #Invocation "this should be done automatically by the subclass: method above"
(SystemDictionary at: #FamixCore) referencedClassList add: ... "classes that are referenced by classes belonging to category #FamixCore"
What do you think?
Cheers, Guillermo.
Message: 1 Date: Mon, 27 Sep 2010 22:00:33 +0200 From: Tudor Girba tudor.girba@gmail.com Subject: [Moose-dev] Re: Class renaming in Moose Algos Graph To: Moose-related development moose-dev@iam.unibe.ch Message-ID: C912A83B-6BDC-4775-AC26-CE2DBC5540AE@gmail.com Content-Type: text/plain; charset=us-ascii
Hi Simon,
These classes should be called MAlgo (or MAL ?). I started to do that a while ago, but apparently I forgot to commit this change.
Cheers, Doru
On 27 Sep 2010, at 19:42, Simon Denier wrote:
On 27 sept. 2010, at 18:17, Lukas Renggli wrote:
Please note that the MA* (with an uppercase $A) prefix is already taken by Magritte. Ma* (with a lowercase $a) is taken by Magma, if I remember correctly they renamed their classes at some point a long time ago to avoid the conflict with Magritte.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Ok, this an old thread, but I found that this idea was already implemented in Pharo:
http://www.youtube.com/watch?v=n4I7fSVNX2A
In order to use it you need to execute:
MCHttpRepository location: 'http://www.squeaksource.com/Environments' user: '' password: ''
I tested it and it works. It only applies to classes that you explicitly define in a package and you need to use a new system browser that is package aware.
What do you think about using this on Moose instead of having class prefixes?
Cheers, Guillermo.
On Tue, Sep 28, 2010 at 9:16 AM, Guillermo Schwarz < guillermo.schwarz@gmail.com> wrote:
Hi Guys,
Why don't you do something more focused on the long term and don't you change the Smalltalk compiler with namespaces?
I don't think it should be that hard since each class already belongs to a category. Each category could instead be a dictionary from where the compiler could find classes that are mentioned in the class source.
This has worked wonders in Java (classes inside packages). This way classes' names can be repeated ad eternum without generating collisions or otherwise polluting excessively the name space.
So for example:
FAMIXAssociation subclass: #FAMIXInvocation instanceVariableNames: 'sender receiver receiverSourceCode signature candidates' classVariableNames: '' poolDictionaries: '' category: 'Famix-Core'
Would be instead:
Association subclass: #Invocation instanceVariableNames: 'sender receiver receiverSourceCode signature candidates' classVariableNames: '' poolDictionaries: '' category: #FamixCore
Then the category would be an index in the SystemDictionary:
SystemDictionary at: #FamixCore put: Category new.
(SystemDictionary at: #FamixCore) belongingClassList add: #Invocation "this should be done automatically by the subclass: method above"
(SystemDictionary at: #FamixCore) referencedClassList add: ... "classes that are referenced by classes belonging to category #FamixCore"
What do you think?
Cheers, Guillermo.
Message: 1 Date: Mon, 27 Sep 2010 22:00:33 +0200 From: Tudor Girba tudor.girba@gmail.com Subject: [Moose-dev] Re: Class renaming in Moose Algos Graph To: Moose-related development moose-dev@iam.unibe.ch Message-ID: C912A83B-6BDC-4775-AC26-CE2DBC5540AE@gmail.com Content-Type: text/plain; charset=us-ascii
Hi Simon,
These classes should be called MAlgo (or MAL ?). I started to do that a while ago, but apparently I forgot to commit this change.
Cheers, Doru
On 27 Sep 2010, at 19:42, Simon Denier wrote:
On 27 sept. 2010, at 18:17, Lukas Renggli wrote:
Please note that the MA* (with an uppercase $A) prefix is already taken by Magritte. Ma* (with a lowercase $a) is taken by Magma, if I remember correctly they renamed their classes at some point a long time ago to avoid the conflict with Magritte.