Hi Nicolas,
I definitely do not want multiple inheritance in Fame. I do not see what you can model
with multiple inheritance and cannot model.
I think the problem you seem to see comes from you not perceiving Traits as Types. But,
they are types, just like classes are. And they should be captured as types in Fame as
well. Perhaps we can even make the MetaDescription be a Trait by default and have no
distinction between Class and Trait at the level of Fame.
Furthermore, the pragmatic reasons for using Traits should not be ignored lightly: Traits
exists as first class in Pharo, which makes it straightforward to map the TraitDescription
to the actual implementation. This is a huge plus.
So, I want to explore the Traits as an option before we discard it. And we already have an
implementation, as I mentioned.
Cheers,
Doru
On Mar 8, 2013, at 9:41 AM, Nicolas Anquetil <Nicolas.Anquetil(a)inria.fr> wrote:
On 03/08/2013 08:10 AM, stephane ducasse wrote:
On Mar 7, 2013, at 5:08 PM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
Yes, we do :).
A model without the appropriate behavior has little value. For example, we want to have
traversals next to the model. It is for this reason that we should use Traits.
Yes
We do not want to use multiple inheritance as a design tool. We should use Traits
instead, as we know it scales better.
do we? :-)
We were discussing this over lunch with Damien Cassou (our trait expert)
It seems to me traits are a behaviour reuse mechanism, Famix is mostly about typing and
structure.
I do not see why we could not use traits to make fame modular.
I did not say I
don't want to use it
But I don't believe it covers all the needs.
For me a model and therefore Famix is inherently typed because it is about describing
things.
For exmple I fighted with Usman and Guillaume because they were using FamixReference to
represent an import between two programs when it should have been some other association.
It worked, but it was not the right semantic.
And models are essentially tools to describe semantics, not implementation.
This is why I don't think traits are the solution in this case.
They are a reuse mechanism, not a typing one.
I
don't think models are just another kind of programming language, they were primarily
intended to be conceptual tools that could be derived to programs.
A programming language must be implementable on a computer (or fail to present much
interest).
A model must be mostly transformable into a program, but some manual tweaking seems
acceptable.
It depends and I do not see the point.
The points is: we know that multiple inheritance is a pain in the back to implement in
programming language.
Yet, we also know that everything everywhere uses something that in lack of better image
I would call multiple inheritance.
So I would like to see if we can define some kind of multiple inheritance to describe
things (fame/famix), and then some clever mechanism to translate this multiple inheritance
into real program (pharo, java, whatever).
nicolas
>>
>> Alain Plantec already did a prototype for having Traits in Fame, but it was not
integrated. It would be great if someone would look into this. The only thing to keep in
mind is that we would have to also update the Java version of Fame.
>>
>> Cheers,
>> Doru
--
Nicolas Anquetil -- RMod research team (Inria)
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev