Re: Difference between stack-allocated class and struct

2011-05-03 Thread Sean Cavanaugh
Here is my prototype COM compile-time reflection based wrapper mixin (which I have abandoned in favor of alias this since it covers 95% of my use cases even though it isn't perfectly safe). I am new at D so you have been warned, though this part of the language seems pretty straightforward

Difference between stack-allocated class and struct

2011-05-02 Thread Mariusz Gliwiński
What are the differences between class instantiated by scope and struct itself? Two, that comes to my mind are: - vtable existance (yep, struct with inheritation - that's what i like) - lol, i just forgot while writing this e-mail :) Sincerely, Mariusz Gliwiński

Re: Difference between stack-allocated class and struct

2011-05-02 Thread Jonathan M Davis
What are the differences between class instantiated by scope and struct itself? Two, that comes to my mind are: - vtable existance (yep, struct with inheritation - that's what i like) - lol, i just forgot while writing this e-mail First off, I would point out that scoped classes are going

Re: Difference between stack-allocated class and struct

2011-05-02 Thread Mariusz Gliwiński
Firstly, thanks for comprehensive answer and I'd like to excuse for my stupid mistakes, which are caused by learning a lot and not actually programming. On date 2011-05-02 23:03, Jonathan M Davis wrote: Classes are reference types and are meant to be on the heap. Yeah, value vs reference

Re: Difference between stack-allocated class and struct

2011-05-02 Thread Jonathan M Davis
Firstly, thanks for comprehensive answer and I'd like to excuse for my stupid mistakes, which are caused by learning a lot and not actually programming. On date 2011-05-02 23:03, Jonathan M Davis wrote: Classes are reference types and are meant to be on the heap. Yeah, value vs

Re: Difference between stack-allocated class and struct

2011-05-02 Thread Piotr Szturmaj
Mariusz Gliwiński wrote: I'll clarify myself: All i would need is extending - without polymorphism. Containment, can be solution for fields which doesn't annoys so much (although image in auto-generated documentation, just like it's with subclassing, would be nice). Unfortunately, the worse case