On Saturday, 27 May 2017 at 16:23:33 UTC, Ola Fosheim Grøstad wrote:
On Saturday, 27 May 2017 at 16:04:42 UTC, Stanislav Blinov wrote:
It's not "a little bit", it's ABI down the drain, along with a good part of runtime. And we'd lose interfaces and extern(C++).

Why would you loose interfaces and extern(C++)?

"struct" and "class" are interchangeable keywords in C++ (only affects encapsulation). So not a lot more difference than POD vs non-POD in C++?

There's a lot more difference in D. Classes in D are fat memory chunks storing pointers to ClassInfo (inc. vtable), Monitor (i.e. for "synchronized") and a list of all interfaces they implement, that's before we get to data members. If we were to remove all that, we'd lose the semi-natural way of interfacing to C++ classes, and some pretty horrendous code involving void* and void** would have to be used.


Reply via email to