Yet another terrible compile time argument proposal
Paul Backus
snarwin at gmail.com
Sun Jan 14 22:49:31 UTC 2024
On Sunday, 14 January 2024 at 21:27:44 UTC, Steven Schveighoffer
wrote:
> On Friday, 12 January 2024 at 22:35:54 UTC, Walter Bright
> [wrote](https://forum.dlang.org/post/unseru$167e$1@digitalmars.com):
>> Given the interest in CTFE of istrings, I have been thinking
>> about making a general use case out of it instead of one
>> specific to istrings.
>
> Been also thinking about this and I have the following
> conclusions:
>
> [...]
Is any of this really necessary at all?
D already has a way to pass data to a function at compile time
(template parameters). It's not perfect, sure, and there are some
use-cases where it's a bit awkward, but it gets the job done. Do
we really need to add a whole new language feature just to have a
second, slightly-different way of doing basically the same thing?
In C++, this approach to language design has lead to having
[seven different types of initialization][1], among other
disasters. If we follow the same path with D, we will end up in
the same place.
[1]: https://en.cppreference.com/w/cpp/language/initialization
More information about the Digitalmars-d
mailing list