Which language constructs could be done as a library if we accept some breaking changes?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Nov 29 11:22:44 UTC 2021
On Sunday, 28 November 2021 at 21:56:37 UTC, Alexandru Ermicioi
wrote:
> I think these could've been implemented as structs, then the
> only change would be to rewrite any T[] to Array!T, given
> structs are able completely replicate their behavior.
Yes, that should be the goal. Improve on meta-programming
facilities and extending structs with more capabilities to make
the language both smaller and more powerful.
And exactly right, "T[…]" could be syntactical sugar that maps
onto a standard library type, making the language more uniform
and adaptable.
> I.e. you won't have any breakage here, though you might
> consider removing them as language constructs, and have the
> said breakage.
I think one has to accept breakage in order to streamline the
language, so it would require D3, but the resulting language
should be equally expressive!
(I think that ought to be possible.)
More information about the Digitalmars-d
mailing list