Compile time values & implicit conditional mixin, as an alternative to tertiary operator hell and one-compile-time functions.

Paul paultjeadriaanse at gmail.com
Sun Jan 17 15:59:31 UTC 2021


On Sunday, 17 January 2021 at 01:51:21 UTC, Paul Backus wrote:
> Why add a dedicated new language feature if you can get the 
> same behavior "for free" using regular old functions together 
> with CTFE? D is already a pretty complex language, after all.

Because the alternative seems more complex to me.
It could be a lot more consistent as well, the way the keyword 
'static' is used at the moment seems very inconsistent to me, the 
same could be said for manifest constants I think.
(Referring to static if, static foreach, static assert instead of 
static attributes)

Having a single keyword for all, with added expressiveness, seems 
a lot clearner & simpler to me.


More information about the Digitalmars-d mailing list