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

IGotD- nise at nise.com
Fri Jun 10 08:51:44 UTC 2022


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.

I'm not sure if AA and arrays are built in the D language. Not 
even classes are built into the language. If I'm not mistaken AA, 
arrays and classes are implemented using meta programming and 
compiler hooks.

It's a matter of definition, yes classes, AA, arrays are part of 
the core language but they aren't really implemented as a core of 
the language.


More information about the Digitalmars-d mailing list