ALF 1.1 RTF Avatar
  1. OMG Issue

ALF11 — Need a syntax for local names with composite semantics

  • Key: ALF11-18
  • Legacy Issue Number: 16601
  • Status: closed  
  • Source: IBM ( Mattias Mohlin)
  • Summary:

    It would be very good if the ALF standard could support a syntax for defining local names with "composite semantics". That is, names for which the value will be automatically destroyed when leaving the current scope. As it is now, objects for local names need to be created explicitly with 'new' and then destroyed explicitly by calling a destructor on the object. It is a very common pattern that objects only should live while inside a particular scope, and then it is error-prone to have to destroy all such objects manually.
    Note that the proposed syntax must be within the minimum conformance subset of the language. Our proposal is to use a syntax similar to the following:

    auto<MyClass> var = new MyClass();

  • Reported: ALF 1.0b1 — Fri, 14 Oct 2011 04:00 GMT
  • Disposition: Deferred — ALF 1.1
  • Disposition Summary:

    Defer

    The RTF agrees that this is an issue worth considering, but, due to lack of time, decided to defer its resolution to a future RTF working on this specification.

  • Updated: Tue, 14 Jul 2020 19:26 GMT