> -----Original Message----- > From: owner-sv-ec@server.eda.org [mailto:owner-sv-ec@server.eda.org] On > Behalf Of Steven Sharp > Sent: Thursday, May 07, 2009 8:51 PM > To: sv-ec@server.eda.org; Mehdi.Mohtashemi@synopsys.com > Subject: Re: [sv-ec] email ballot: response due by 1:00pm PDT Wednesday May > 13 2009 > > > > > >id 185, svdb 2342 _____ YES __X__ No > > > >http://www.eda.org/svdb/view.php?id=2342 > > I oppose this proposal because it explicitly allows the constructor to be > declared "local". The behavior of this has not been defined. The class > could be extended. The derived class constructor would normally call the > super.new(), implicitly or explicitly. But a local method cannot be called > from the derived class. It is not clear how this conflict is supposed to > be resolved. > [DR] A local constructor is currently legal syntax and is well defined by the text in 8.17 "A member identified as local is available only to methods inside the class". Therefore, a local constructor cannot be called from a derived class, effectively making the class inextensible. The application of a local or protected constructor is beyond the scope of the LRM, but well covered in object-oriented textbooks on design patterns. Removing the first sentence of the proposal would not make local/protected constructors illegal, just less obvious. It would also seem strange to mention the virtual/static class qualifiers without mentioning the local/protect qualifiers. Dave -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri May 8 00:22:39 2009
This archive was generated by hypermail 2.1.8 : Fri May 08 2009 - 00:23:36 PDT