> 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. But a variable of struct type is the struct object itself, whereas a variable of class type is a handle - right? That somewhat affects the semantics of a copy such as "v1=v2;" ! Whatever your opinions of the desirability of the dichotomy between structs and classes, it has the useful side-effect that structs typically are tractable for synthesis whereas classes typically are not. I reckon that's something worth bearing in mind if any extensions of the struct concept (e.g. parameterization) are considered. > 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. I agree that this text in the LRM is probably undesirable. It aims to fix one particular kind of misunderstanding, and is quite bewildering to anyone who doesn't have that specific misunderstanding. -- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: +44 (0)1425 471223 Email: jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 Web: http://www.doulos.com The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Apr 9 04:18:28 2007
This archive was generated by hypermail 2.1.8 : Mon Apr 09 2007 - 04:18:59 PDT