https://issues.dlang.org/show_bug.cgi?id=18945

--- Comment #6 from Jonathan M Davis <[email protected]> ---
(In reply to David Bennett from comment #4)
> I'm not sure what workaround we would recommend in the deprecation messaged
> as the current functionality is actually hard to replicate.

Just use an enum if you want the value to be known and used at compile time,
and use an immutable variable if you want it to be known and used at runtime.
Don't try to have a variable with different values at compile time and runtime.
And if for some reason, you want the value calculated at compile time but to
still have a variable, then use an enum to initialize the immutable variable.
That's what you have to do with mutable variables already.

--

Reply via email to