Issue 16601: Need a syntax for local names with composite semantics (alf-rtf) Source: (, ) Nature: Enhancement Severity: Significant 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(); Resolution: The FTF 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. Revised Text: None Disposition: Deferred Revised Text: Actions taken: October 14, 2011: received issue October 5, 2012: deferred Discussion: End of Annotations:===== m: webmaster@omg.org Date: 14 Oct 2011 06:20:52 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Mattias Mohlin Employer: IBM mailFrom: mattias.mohlin@se.ibm.com Terms_Agreement: I agree Specification: ALF Section: 9.6 FormalNumber: ptc/2010-10-05 Version: FTF ­ Beta 1 Doc_Year: 2010 Doc_Month: October Doc_Day: 05 Page: 108-111 Title: Need a syntax for local names with composite semantics Nature: Enhancement Severity: Significant CODE: 3TMw8 B1: Report Issue Description: 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 var = new MyClass();