[Issue 13185] Detect precondition violations at compile time when possible
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Tue Jul 22 06:49:30 PDT 2014
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13185
--- Comment #2 from yebblies <yebblies at gmail.com> ---
(In reply to bearophile_hugs from comment #1)
> 
> In my opinion it's much better to offer the programmer an explicit way to
> tell the compiler that a compile-time testing (where/if possible) is
> desired, using an "enum precondition":
> 
I think they have different purposes.  This is simply extra best-effort
checking to catch invalid calls at compile-time.  It does not allow you to
implement custom static checking.
--
    
    
More information about the Digitalmars-d-bugs
mailing list