Hi,
On 24 Sep 2011, at 10:21, Stéphane Ducasse wrote:
On Sep 24, 2011, at 10:00 AM, Tudor Girba wrote:
Hi,
On 23 Sep 2011, at 22:15, Stéphane Ducasse wrote:
Hi guys
Is there a reason why we get #Attribute and not FAMIXAttribute
I do not understand. Do you refer to the name of the MetaDescription? If yes, that is because the qualified name is 'FAMIX.Attribute', given that it belongs to the FAMIX package. So, there is no need to prefix the class name.
and/or super: #FAMIXStructuredEntity instead of
super: 'FAMIX.StructuredEntity'Ok, this is pretty much crappy :). #FAMIXStructuredEntity will perform a lookup of the class in the Smalltalk image. 'FAMIX.StructuredEntity' will perform it in the Fame meta repository. We should only use symbols because they are also affected by refactorings. I will create a rule :).
I do not get it. Why two different lookup for a single position argument because we jhave in the image
<MSEClass: #Attribute super: 'FAMIX.StructuralEntity'> and <MSEClass: #Association super: #FAMIXSourcedEntity>
And to me super: is the same kind of lookup not two.
I know. That is why I said I did not like it (=crappy). We had this argument before, but Adrian wanted it this way, and it remained like this. The reason is that sometimes (in 0.001% of cases) you might have an entity that is only defined in Fame but not directly in Smalltalk. In that case, you want to look it up in Fame, not in Smalltalk.
Now we can change it and only provide the Smalltalk based lookup.
So I would prefer to have something regular either
#'FAMIX.Attribute' super: #'FAMIX.StructuredEntity' or #Attribute super: #StructuredEntity
In fact I would prefer
#'FAMIXAttribute' super: #'FAMIXStructuredEntity
No. It should be: MSEClass: 'Attribute' super: #FAMIXStructuralEntity
I try to understand what you meant
If FAMIXStructuralEntity is to look up the FMClass in the metatower and look for the MSEClass: 'StructuralEntity' super: #Whatwever
Then I do not get why it should be #FAMIXStructuralEntity MSEClass: 'Attribute' super: #FAMIXStructuralEntity
and not MSEClass: 'Attribute' super: #StructuralEntity
You have the have the fully qualified name, not just the name of the meta description (you might have two in two distinct packages).
Finally I do not get the need to have FAMIX in front of the second one because it looks like you hardocde in the anme the package and this is not nice and looks bad
MSEClass: #Attribute# super: #StructuralEntity package: #FAMIX
Fame already provides a lookup based on the fully qualified name, so we can safely use that.
would be better to me.
Then I do not see why you have a string and a symbol this makes everything more complex
See the above explanation.
MSEClass: 'Attribute' super: #FAMIXStructuralEntity
So MSEClass: 'Attribute' super: #FAMIXStructuralEntity does not satisfy me
It should :).
So tell me and we fix it but once for all.
#FAMIXStructuralEntity points to the name of the Smalltalk class. There is no other way around it. This is the most robust way of referring to the superclass because if we rename the Smalltalk class, the pragma will be updated as well (it's a symbol).
So, everywhere we have superclass: we should have the name of the Smalltalk class.
Now, that we are at it, we should introduce also only FM3Class: pragma and rely on the default Smalltalk superclass information. Like this we do not have to maintain it at all. Again, this is something I argued a while ago, but did not get introduced.
Cheers, Doru
Stef _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"In a world where everything is moving ever faster, one might have better chances to win by moving slower."