Class renaming in Moose Algos Graph

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Class renaming in Moose Algos Graph

Guillermo Schwarz
Ok, this an old thread, but I found that this idea was already implemented in Pharo:


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 <[hidden email]> 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 <[hidden email]>
Subject: [Moose-dev] Re: Class renaming in Moose Algos Graph
To: Moose-related development <[hidden email]>
Message-ID: <[hidden email]>
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.
>



--
Saludos cordiales,

Guillermo Schwarz
Sun Certified Enterprise Architect

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Class renaming in Moose Algos Graph

Stéphane Ducasse
In reply to this post by Guillermo Schwarz
We do not want that.

Stef

> 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 <[hidden email]> 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 <[hidden email]>
> Subject: [Moose-dev] Re: Class renaming in Moose Algos Graph
> To: Moose-related development <[hidden email]>
> Message-ID: <[hidden email]>
> 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.
> >
>
>
>
> --
> Saludos cordiales,
>
> Guillermo Schwarz
> Sun Certified Enterprise Architect
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
12