article comparing Rust and Zig, many points relevant to D

mw mingwu at gmail.com
Wed Mar 10 21:53:37 UTC 2021


On Wednesday, 10 March 2021 at 18:17:19 UTC, jmh530 wrote:
> On Wednesday, 10 March 2021 at 17:59:56 UTC, VF wrote:
>> [snip]
>>
>> I think the biggest reasons are bugginess and instability. 
>> Those are my reasons for wanting to get out of D, and also 
>> feature bloat. I want a simpler language, but am not seeing 
>> good options...
>>
>> 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!
>>
>> int main() {
>>     import std.stdio;
>>     writeln(A.sizeof);       // => 8
>>     writeln(A.id.offsetof);  // => 4
>> }
>
> I couldn't get this exact thing to run (the A.id.offsetof part

I think he mean: A.x.offsetof



More information about the Digitalmars-d mailing list