On Wed, Oct 11, 2017 at 3:03 PM, Nicolas Anquetil
<nicolas.anquetil(a)inria.fr> wrote:
Hello,
it is generally a bad idea to use inheritance for reuse instead of
subtyping. It is a sure recipe to future problems.
So what you are proposing would work (for example inheriting methods and
overriding them to raise errors), but it is a hack that will hit back
whoever maintains the code in a few years/months.
I very strongly vote against your proposition. We need to think harder and
longer to find an appropriate solution that will both respect the "real
nature" of things (it does not make sense to ask a comment or an association
allIncomingAccesses)
In the past we had problems with relations made to entities that were not
the right one (for example using references for the worng thing).
I understand your concern but currently it already works this way, but
not for all entities.
FAMIXType understand #queryIncomingInvocations and
#queryOutgoingInvocations but it cannot return something because it
does not have any invocation in its properties.
The other solution would be to change the Trait to get only the query
system without any reference to FAMIXInvocation, FAMIXReference,
FAMIXInheritance, FAMIXAccess. Thus we would remove all
#query{Direction}{Association} from the trait and we would add them
directly on the entities concerned by extension. Because either we
accept that all the entities understand those methods or only the
entities that *can* return something understand them.
For now we are in between. Not all entities understand those methods
but some on them understand methods they have nothing to return for
except an empty result and this situation make it complicated to build
generic tools.
I wait you answer about this.
nicolas
--
Nicolas Anquetil
RMod team -- Inria Lille
_______________________________________________
Moose-dev mailing list
Moose-dev(a)list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev
--
Cyril Ferlicot
https://ferlicot.fr
http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France