Why there are no 'physical' object variables (only references)?

Steve Horne stephenwantshornenospam100 at aol.com
Wed Sep 13 03:04:44 PDT 2006


On Wed, 13 Sep 2006 19:09:20 +1000, Reiner Pope
<reiner.pope at REMOVE.THIS.gmail.com> wrote:

>> Compiler generated proxy object, containing a vtable and a pointer to
>> the struct.
>What's the difference between this and a class, then?

Er - you'd have to write the class yourself?

>> Mind you, it's very dodgy, to say the least. I have argued for struct
>> inheritance, but this is not the kind of inheritance I want.
>I don't understand what you do want, then. Interface inheritance 

I never said I want interface support for structs. I just joined in a
thread on someone elses idea. Just saying its possible - not that it's
a good idea ;-)

The struct inheritance I want allows structs to inherit from structs,
adding a few extra data fields. What to do about methods, I don't
know. I'm not comfortable with structs having methods anyway - a
result of a style developed in C++ where the keywords 'struct' and
'class' tend to imply different things to programmers even though the
compiler sees them the same.

And I'm not all that fussed about struct inheritance either. Just
can't leave things alone when people disagree with me ;-)

-- 
Remove 'wants' and 'nospam' from e-mail.



More information about the Digitalmars-d mailing list