[sv-ec] MERGE REVIEW draft 2: Chapter 8

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Sat Apr 07 2007 - 22:56:29 PDT
8.1 "Class instances, or objects, can be passed around via object
handles, which provide a safe-pointer capability in the language."  The
"in the language" could be eliminated.

8.1  "Any variable data type can be declared as a class member."  What
is a variable data type?  Is this trying to say what 8.5 later says as
"There are no restrictions on the data type of a class property."?

8.26 "On the surface, it might appear that class and struct provide
equivalent functionality, and only one of them is needed. However, that
is not true; class differs from struct in three fundamental ways"

I think this subclause adds nothing but confusion, and could be
eliminated.  Consider the three "fundamental" differences --

  1)  "Creating an object is done by calling new."  Maybe a struct is
syntactic sugar for a class with all its members public and there's an
implicit new in the declaration of a struct object. 

  2)  "unlike C, SystemVerilog handles are guaranteed to be safe"  This
isn't a C LRM.  Point 2 doesn't even mention structs.

  3)  "Class inheritance, abstract classes, and dynamic casting are
powerful mechanisms that go way beyond the mere encapsulation mechanism
provided by structs."  Again, maybe structs are just a special case of
classes.

See also http://www.eda-stds.org/sv-bc/hm/4713.html .

-- Brad



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sat Apr 7 22:57:02 2007

This archive was generated by hypermail 2.1.8 : Sat Apr 07 2007 - 22:57:33 PDT