On Saturday, 22 May 2021 at 13:26:38 UTC, sighoya wrote:
But the more general problem in D are not features per se, but
how they are composed of.
For instance: Why no AST macros instead of string mixins,
templates, mixin templates and alias?
All these forms could be special ast macros.
I think AST macros require a tiny core language and having most
of the language features being implemented by macros. The D AST
is not really suitable as it stands.
D is a bit like C++ in this regard, there might be a minimal core
language that could be distilled from it, but it would take a D3
full breaking change to get there, so it won't happen.
Structs are nice but at the same time awful to use because they
are incompatible with interfaces and classes, I hope this will
change to some extent, but I think it wouldn't be that smooth.
You could probably expose classes in a form that is compatible
with structs, but that would expose implementation details and
give implementors less freedom.