QVT 1.0 NO IDEA Avatar
  1. OMG Issue

QVT — 8.4.3.5 = and ==

  • Key: QVT-32
  • Legacy Issue Number: 10990
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    Having two identical operators is redundant and so a bad idea.

    Introducing a new operator that looks just like a C/Java comparison operator is
    guaranteed to confuse all novices into thinking that = obviously means assignment.

    So this friendly addition is really unfriendly to novices and redundant for experts.

    Suggest: remove == so that novices learn that = is comparison very quickly.

  • Reported: QVT 1.0b1 — Mon, 30 Apr 2007 04:00 GMT
  • Disposition: Resolved — QVT 1.0
  • Disposition Summary:

    Resolved

    In Section 8.4.3 "Shorthands used to invoke specific pre-defined operations", remove 'both alternative should be available' in numbers 5 and 6. In addition, at the end of this section, add the following paragraph:
    """
    The alternative '==' and '!=' notations can only be used if the source file pre-declares the intention of using them by means of a directive placed before entering the library of the transformation definitions. The syntax of this directive should be a comment having the following form:
    – directive: use-traditional-comparison-syntax or
    // directive: use-traditional-comparison-sysntax
    This declaration makes illegal the usage of the corresponding OCL-like syntax ('=' and '<>') within the compilation unit.

  • Updated: Fri, 6 Mar 2015 20:54 GMT