static if enhancement
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 24 08:43:58 PDT 2016
On Friday, 24 June 2016 at 15:34:42 UTC, Stefan Koch wrote:
> On Friday, 24 June 2016 at 15:24:48 UTC, Andrei Alexandrescu
> wrote:
>> Does anyone else find this annoying?
>> https://issues.dlang.org/show_bug.cgi?id=16201 -- Andrei
>
> This would mean treating static if's differently if they alter
> control flow in a scope larger then themselves.
>
> Special casing a static if that returns would not be as bad.
> But with the current state of the compiler I would hold of on
> such complications.
To elaborate:
This requires control-flow analysis over all static if branches,
to find and very one special case which we treat specially.
It would only be beneficial If we hit this case predominantly.
However, I am not sure how much langauge complexity this adds.
More information about the Digitalmars-d
mailing list