Why are some types from std not in the core of the language?

Paul Backus snarwin at gmail.com
Fri Jun 10 13:21:09 UTC 2022


On Friday, 10 June 2022 at 01:16:10 UTC, mesni wrote:
> On Friday, 10 June 2022 at 01:08:02 UTC, mesni wrote:
>> D has AA and arrays built into the language and runtime. But 
>> why are sumtype, arrays/smart pointers using custom 
>> allocators, nullable, tuple at the expense of std? Everything 
>> listed in this article https://dlang.org/articles/builtin.html 
>> applies to them. I think this can be done as something like an 
>> optional extension in the compiler.
>
> By the way, all modern system languages ​​(zig, odin) have such 
> types built in. And D, due to the need to maintain 
> compatibility (although it still breaks it), moves away from 
> the roots and follows the path of C++

To quote [my own post][1] on the subject:

> The dirty secret here is that the code quality of the DMD 
> fronted has deteriorated to the point where it is basically 
> impossible to do a correct, complete implementation of any 
> non-trivial language feature. So we can either have a library 
> solution that works, but has ugly syntax; or we can have a 
> language solution that has nice syntax, but doesn't work.

Most contributors would rather build something that's ugly and 
correct than something that's beautiful and broken, so they 
mostly choose to write new libraries instead of new language 
features.

[1]: 
https://forum.dlang.org/post/jccdguayqqziwaxnhxts@forum.dlang.org


More information about the Digitalmars-d mailing list