Issue 6879: The notation for testing the type of a metaclass is too verbose (ocl2-rtf) Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com) Nature: Uncategorized Issue Severity: Summary: Suggestion: Use special characters to denote a call to oclIsKindOf and oclIsTypeOf. For instance, use '#ActionState' instead of 'oclIsKindOf(ActionState)' and use '##ActionState' instead of 'oclIsTypeOf(ActionState)' 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. oclIsKindOf and oclIsTypeOf are already a source of confusion; oclIsTypeOf should rarely be used but is the more obvious name to new users, so providing a shorthand for oclIsTypeOf is unnecessary. The # syntax has no terminator so the shorthand needs an ambiguity resolution for a.#B.c() The suggested usage seems to conflict with the intuition of those familiar with unary prefixes of assembler languages or even OCL 1.x enumeration literals. If an improvement is to be made, something like (a as B).c() would contribute to rather than hamper readibility. 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:===== ubject: Issues for OCL 2.0 Date: Wed, 7 Jan 2004 17:08:04 +0100 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Issues for OCL 2.0 Thread-Index: AcPVOG0frqYwyJQkQBuiYi4q0YGTcg== From: "BELAUNDE Mariano FTRD/DTL/LAN" To: "Juergen Boldt" Cc: , "Bast, Wim" X-OriginalArrivalTime: 07 Jan 2004 16:08:06.0685 (UTC) FILETIME=[6FC93CD0:01C3D538] Dear Juergen, Could you please, post the following 16 issues to the OCL 2.0 FTF? Thanks in advance and happy new year, Mariano ----------------------------------------------------------------- ISSUE: The notation for testing the type of a metaclass is too verbose. Suggestion: Use special characters to denote a call to oclIsKindOf and oclIsTypeOf. For instance, use '#ActionState' instead of 'oclIsKindOf(ActionState)' and use '##ActionState' instead of 'oclIsTypeOf(ActionState)'