static if enhancement

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 24 13:52:49 PDT 2016


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

please, no. introduce `final static if` or something, but don't 
do this with `static if` itself. it makes special case `static 
if` (one more special deviation to remember, oh, noes), and DMD 
interproc analysis is non-existing, so `static if (...) { 
functionThatAlwaysThrow(); }` would fail. and even if it 
wouldn't, it is still bad, as now i have to guess if that 
function "never return" or no.


More information about the Digitalmars-d mailing list