Why is D unpopular?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Nov 9 08:08:28 UTC 2021
On Monday, 8 November 2021 at 22:53:09 UTC, 12345swordy wrote:
> That is because I literally have no idea what exactly does your
> solution consist here! Right now, I am not convinced at all
> regarding your solution.
Alright, but my sketch of a solution would require rethinking the
D type system and that would have to follow a restructuring of
compiler internals, so it would totally depend on the compiler
authors' willingness to build a clean architecture first. Meaning
it is something you could plan for, but not do over night.
Anyway, the solution would be to make the language more uniform
under-the-hood. So you would not necessarily notice it much as an
application programmer, it would mostly be visible in
meta-programming.
So what you do is you internally in the compiler collapse struct
and class into one concept, with the ability to constrain it.
That way a class and a referenced structs become similar in
meta-programming.
For an application programmer it could be more or less the same
as now, if desired. Syntax could be expanded internally into the
new representation.
More information about the Digitalmars-d
mailing list