[sv-ec] class construction syntax - new feature proposal

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Fri Sep 05 2008 - 00:42:44 PDT
There is one annoying thing in object contruction syntax in SV - there is no
neat and nice way to create an object of user choosen type and assign it to
handle of different (compatybile type) - consider:
 
class B;
endclass
class C extends B;
endclass
 
C c;
B b;
 
initial begin
    c=new;
    b=c; //I have to write 2 lines of code to create and assign object of
child type to handle of base type
//my proposal is to accept syntax: new <class_type_identifier> - which
always creates an object of pointed type and returns handle to it
    b = new C;
end
 
I haven't found mantis on it and I cannot see any obsticles to add it to
LRM.  I've think that this is very usefull - so please consider adding such
feature.
 
 
DANiel

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Fri Sep 5 00:43:46 2008

This archive was generated by hypermail 2.1.8 : Fri Sep 05 2008 - 00:44:28 PDT