ADL2 default_value in c_defined_object (f.e. c_complex_object) not in grammar

Activity

Show:
Thomas Beale
January 14, 2016, 11:08 AM

This one actually isn't yet developed for the grammar, but needs to be, when we work out exactly how to do it. So I would consider this issue to be a change request for the near future which we will need to include on the next ADL2.x release.

Bert Verhees
January 15, 2016, 8:46 AM

I think indeed this is a tough one. Some suggestions, the default_value must be of the type (or instanceof) of the encapsulated class. Or else it cannot be a default_value. So it must be (at least) of c_defined_object.

But I am glad to leave this to the wise men/women to decide.

So in the meantime, it is a null_value.

Thomas Beale
January 15, 2016, 9:04 AM

Yes, you are correct. I have not gotten around to creating all the relevant redefinitions in lower classes. In Eiffel, there is a capability that UML and all languages should have called 'anchored types', which would enable us to write:

default_value: like Current

(Current = self or 'this' in other languages). If we had this, specifications would be very efficient. As it is, we are stuck with 1980's thinking in UML and most languages on this one...

Bert Verhees
January 25, 2016, 9:56 AM

no problem, just a remark to explain will do

Reporter

Bert Verhees

Labels

None

Components

Affects versions

Priority

Major
Configure