Issue 15712: OCL 2.2 Allow optional let type (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: 9.3.36 states "A variable declaration inside a let must have a declared type and an initial value." In the case of a Tuple literal assigned to a let variable, this requires that the tuple signature be entered twice. Suggest relaxing the requirement on a type to allow deduction from the initial value. Resolution: Revised Text: Actions taken: October 11, 2010: received issue Discussion: End of Annotations:===== ronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhcFAKtJskzUnw4U/2dsb2JhbACUDY18cb5ZhUgE Date: Mon, 11 Oct 2010 07:19:01 +0100 From: Ed Willink User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 To: issues@omg.org Subject: OCL 2.2 Allow optional let type Hi 9.3.36 states "A variable declaration inside a let must have a declared type and an initial value." In the case of a Tuple literal assigned to a let variable, this requires that the tuple signature be entered twice. Suggest relaxing the requirement on a type to allow deduction from the initial value. Regards From: "Uhl, Axel" To: "ocl2-rtf@omg.org" Date: Mon, 11 Oct 2010 16:32:07 +0200 Subject: RE: issue 15712 -- OCL 2 RTF issue Thread-Topic: issue 15712 -- OCL 2 RTF issue Thread-Index: ActpT+HWOp2+hif2Rc6FmYFS6MhO9AAAQMng Accept-Language: en-US, de-DE X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US, de-DE +1 It has been a long-standing hassle having to redundantly repeat the type declaration for each let, particularly as there are only rare use cases for declaring a more general type for the variable than what would be derived from the initExpression anyway. As a matter of fact, SAP entertained its own OCL implementation which has always handled it this way Best, -- Axel From: Juergen Boldt [mailto:juergen@omg.org] Sent: Monday, October 11, 2010 4:19 PM To: issues@omg.org; ocl2-rtf@omg.org Subject: issue 15712 -- OCL 2 RTF issue X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhcFAKtJskzUnw4U/2dsb2JhbACUDY18cb5ZhUgE Date: Mon, 11 Oct 2010 07:19:01 +0100 From: Ed Willink User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 To: issues@omg.org Subject: OCL 2.2 Allow optional let type Hi 9.3.36 states "A variable declaration inside a let must have a declared type and an initial value." In the case of a Tuple literal assigned to a let variable, this requires that the tuple signature be entered twice. Suggest relaxing the requirement on a type to allow deduction from the initial value. Regards Ed Willink Juergen Boldt Director, Member Services Object Management Group 140 Kendrick St Building A Suite 300 Needham, MA 02494 USA tel: +1 781 444 0404 x 132 fax: +1 781 444 0320 email: juergen@omg.org www.omg.org Ed Willink