Issue 6880: The notation for selecting elements should be more intuitive (ocl2-rtf) Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com) Nature: Uncategorized Issue Severity: Summary: Suggestion: Use brackets as an alternate option to denote a call to the "select" function. Notation: mylist[iterator | condition] Example: self.ownedElement[#Class and name="MyClass"] -- #Class is a shorthand for oclIsKindOf(MyClass) equivalent to : self.ownedElement->select(oclIsKindOf(Class) and name="MyClass") Resolution: The suggested syntax comes from QVTo. Non-trivial OCL expressions can be difficult to read. Introducing shorthand notations compromises readability. At present OCL has "." and "->" shorthands that cause significant difficulties. Introducing more does not seem appropriate for the standard language. It is not clear that introduction of another [..] syntax can avoid conflicts with the already challenging conflicts for association qualifiers and array indexes. Disposition: Closed, no change Revised Text: Actions taken: January 7, 2004: received issue December 23, 2013: closed issue Discussion: This is a request to improve the language. Better solved in a RTF. End of Annotations:===== SSUE: The notation for selecting elements should be more intuitive. Suggestion: Use brackets as an alternate option to denote a call to the "select" function. Notation: mylist[iterator | condition] Example: self.ownedElement[#Class and name="MyClass"] -- #Class is a shorthand for oclIsKindOf(MyClass) equivalent to : self.ownedElement->select(oclIsKindOf(Class) and name="MyClass") Reply-To: Joaquin Miller X-Sender: jm-acm.no@sbcglobal.net@pop.sbcglobal.yahoo.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Wed, 04 Feb 2004 12:51:48 -0800 To: UML Superstructure FTF From: Joaquin Miller Subject: Ballot 5 X-Change Technologies votes Yes on all issues in Ballot 5, except for issue 6880. We would change our vote to yes if -- the resolution text was: In Figure 192, p 277, make the structuredNode association end derived from Activity to StructuredActivityNode and from ActivityEdge to StructuredActivityNode. -- and the failure to specify the derivation of the association was corrected, as called for by the issue. Joaquin PGP Fingerprint: CA23 6BCA ACAB 6006 E3C3 0E79 2122 94B4 E5FD 42C3