article comparing Rust and Zig, many points relevant to D

Adam D. Ruppe destructionator at gmail.com
Wed Mar 10 18:08:39 UTC 2021


On Wednesday, 10 March 2021 at 17:59:56 UTC, VF wrote:
> Speaking of bugginess, here's the latest bug that I noticed 
> (dmd 2.094):
>
> mixin template X() { int x; }
>
> struct A { mixin X; int x; } // <- that compiles!

That's not a bug, it is working by design and it is a very useful 
design, allowing specialization of public members while keeping 
state of private members.


More information about the Digitalmars-d mailing list