Compile time values & implicit conditional mixin, as an alternative to tertiary operator hell and one-compile-time functions.
Doug
doug_x_010123051385 at hotmail.com
Sun Jan 17 03:03:53 UTC 2021
On Sunday, 17 January 2021 at 02:02:00 UTC, Max Haughton wrote:
> On Sunday, 17 January 2021 at 00:28:02 UTC, Paul wrote:
>> [...]
>
> They would have the potential to make compiling really hard if
> they were allowed freely. If you imagine a mutable enum at
> module scope, it could be modified all over the place and lead
> to completely non-deterninistic compilation.
>
> Some mechanisms to (say) add to a table at compile time might
> be useful (you can fake this using ELF sections), but
> mutability is a footgun
We're getting aliases that may be assigned multiple times before
being read; so why not?
More information about the Digitalmars-d
mailing list