QVT 1.3 RTF Avatar
  1. OMG Issue

QVT13 — QVTr: Variable Initialization

  • Key: QVT13-43
  • Legacy Issue Number: 19665
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    QVTr does not allow variables to be initialized at the point of declaration. This is a rather prehistoric limitation that significantly degrades readability.

    a) it requires separate declaration and assignment lines
    b) it inhibits inference of the variable type from the initializer
    c) it obfuscates the variable assignment

    The latter is a particular problem in QVTr where the assignment may a consequence of a pattern match;

    Suggest allowing an initializer on a VarDeclarationCS and allowing the type to be inferred from the initializer.

  • Reported: QVT 1.2 — Fri, 28 Nov 2014 05:00 GMT
  • Disposition: Resolved — QVT 1.3
  • Disposition Summary:

    QVTr Variable Initialization

    QVTr does not allow variables to be initialized at the point of declaration. This is a rather prehistoric limitation that significantly degrades readability.

    a) it requires separate declaration and assignment lines
    b) it inhibits inference of the variable type from the initializer
    c) it obfuscates the variable assignment

    The latter is a particular problem in QVTr where the assignment may a consequence of a pattern match;

    Suggest allowing an initializer on a VarDeclarationCS and allowing the type to be inferred from the initializer.

    Discussion

    The underlying Abstract Syntax supports an initializer.

    Prototyping in Eclipse QVTr demonstrated a useful reduction in line count and increase in clarity of the RelToCore transformation.

  • Updated: Tue, 29 Mar 2016 15:09 GMT