Le 29/11/2011 19:52, Andrei Alexandrescu a écrit :
On 11/29/11 10:50 AM, deadalnix wrote:
2/ Use that stract/class as a value type. You can do POD, but also
define constructor and destructor, copy constructor and overload
assignement. Anyway, you'll never be able to use proper polymorphism
here, because it would require virtual destructor at least. This is IMO,
what D's struct should achieve.

Yes.

The 2/ case is overly used in almost any C++ program. And D struct
should be able to match them. It wouldn't require much to make it
working :
- Default constructor.

No.


No, as "No it will never be done for reason xxx" or as in "No you are wrong and it not necessary, here the way to do : xxx".

In both cases, the xxx is the most interesting part :'(

- The hability to define opAssign for it's own type if this(this) is
disabled.

Yes. That's a bug. Could you please file?


Doing it right now. Have to get a sample code and actual compiler output. That would solve at least the copy problem.

Reply via email to