Why is separating class ind struct is bad?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Sat Mar 26 00:42:43 PDT 2016


On Saturday, March 26, 2016 06:26:44 Suliman via Digitalmars-d wrote:
> Here on forum I have found very interesting mention from
> Alexandrescu that:
> "Rust has two advantages I can think of: it doesn't have the
> struct/class split that D does". Could anybody explain why it's
> bad, and maybe till Volta in WIP it's not later to change it.
>
> Could anybody explain what this mean and why this way is not
> modern?

I expect that you're referring to a recent thread where interfacing with C++
was being discussed and how D compares to Rust in that regard. And when
talking specifically about interfacing with C++, D's separation of structs
and classes is potentially a problem, because that's not what C++ does. So,
we're either limited in some respects with how D interfaces with C++ and/or
the inferfacing code becomes more complicated. So, while the separation
between structs and classes definitely good for D code in general, it does
pose a problem when interfacing with C++.

- Jonathan M Davis



More information about the Digitalmars-d mailing list