-
Key: UML25-528
-
Legacy Issue Number: 18759
-
Status: closed
-
Source: Change Vision ( Michael Chonoles)
-
Summary:
The rules on Parameter Direction and Effect, seem overly weak.
It doesn't seem to make sense to have a formal "inout" to also have the formal effect "delete", because it would be clearer to say "in"
It doesn't seem to make sense to a formal "inout" to also have the formal effect "create", because it would be clearer to say "out"
And Conrad says:
Seems like we could change the modeling constraints to prevent inouts for create and delete, if we didn't mind the backward incompatibility.But Ed Seidewitz says
The object passed out in on inout parameter doesn't have to be the same one that was passed in.For a "create" effect, the text says "Objects passed out of executions of the behavior as values of the parameter do not exist before those executions start." It doesn't say anything about objects passed in. Therefore, you could pass a non-null value into an inout parameter with the "create" effect, as long as the object passed out is a different, new object.
The wording for "delete" is a little less clear, but I think it is reasonable to assume that it means that the object passed in on an inout parameter is destroyed, but that some other object could be passed out.
Indeed, conceptually, an inout parameter could conceptually be both "delete" AND "create", meaning you pass in an object that gets destroyed and then get out a newly created object. However, the abstract syntax only allows at most one effect on a parameter
So, we have at least different suggestions for changes to this material.
-
Reported: UML 2.5b1 — Wed, 5 Jun 2013 04:00 GMT
-
Disposition: Resolved — UML 2.5
-
Disposition Summary:
Merged with 17891
-
Updated: Fri, 6 Mar 2015 20:59 GMT
UML25 — UML: Parameter Direction and Effect
- Key: UML25-528
- OMG Task Force: Unified Modeling Language 2.5 (UML) FTF