Can we just have struct inheritence already?
Exil
Exil at gmall.com
Tue Jun 11 14:05:03 UTC 2019
On Tuesday, 11 June 2019 at 01:42:37 UTC, SonicFreak94 wrote:
> On Tuesday, 11 June 2019 at 01:33:58 UTC, Exil wrote:
>> You can do this with structs and alias this now. I also doubt
>> code injection is something a language should consider for its
>> use cases. It is only really useful for a niche.
>
> Convenient, with the caveat that one must add that as a field
> manually and then add another line to alias it. Two D lines for
> the functionality of one in C++, just so that I can share
> members...
So you are using C++ instead of D in some instances cause you
don't want to write one extra line of code? If you put it in a
mixin then it is only 1 line of code. I wouldn't split my
codebase like that just for one line of code, but I guess that's
your decision to make.
More information about the Digitalmars-d
mailing list