Daniel, In SV, class "allocation" and "construction" are linked via the "new" call. That is by intent. In some other languages one can decouple allocation and construction and in such cases it might make more sense to do what you are suggesting, but SV does not currently allow such decoupling. The requirement to use "super.new" rather than "<class_type>::new" is to enforce a strict chaining sequence. SV could have allowed B::new for the chain call but then would need to explicitly require that only the immediate super class method be called. Requiring use of super.new is much simpler and doesn't impose any real burden or additional restriction. Gord. danielm wrote: > IMHO there is lack of restriction on that constructor cannot be > explicitly called : > > - in class method, > > - via scope operator <BASE_CLASS>::new, > > - throught class handle C c; initial c.new; > > The only possibility is to call it via super.new (with all restriction > described in chining constructor chapter). Or in class handle > initialization, assignment. > > > > Current text is not so clear so smdb may try: > > class C extends B; > function new(); > B::new; > B::new; > endfunction > endclass > > > > DANiel > > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Apr 9 07:00:20 2008
This archive was generated by hypermail 2.1.8 : Wed Apr 09 2008 - 07:00:30 PDT