what was wrong with struct & class in C++?

Russell Lewis webmaster at villagersonline.com
Thu Dec 13 16:36:55 PST 2007


Walter Bright wrote:
> Russell Lewis wrote:
>> Hear, hear!  Good arguments, all!  It still doesn't answer why we left 
>> out the little star on class-reference variable assignments.  As I've 
>> argued before, the question of syntax is orthogonal to the question of 
>> legal operations.  Make value-style operations illegal for classes, 
>> and keep the star there, IMHO.
> 
> It would make writing generic code unnecessarily difficult.

????  I thought that one of the key arguments for putting the syntax 
back to the C++ way was that it would make generic code easier to write. 
  Right now, when we perform an assignment, generic code can't know 
(without specialization) whether it is assigning a value or a reference 
type.



More information about the Digitalmars-d mailing list