checkedint call removal

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Tue May 23 02:05:04 PDT 2017


On Tuesday, 23 May 2017 at 08:41:12 UTC, Ola Fosheim Grøstad 
wrote:
> But in C++/D etc "predicate" usually is just used to refer to a 
> boolean pure function in the language. Which is reasonable 
> since there is no support for propositional or predicate logic. 
> A D assert is only evaluated when we know the actual boolean 
> value, which is sound.

As an example, if D had support for propositions we would be able 
to instantiate templates with boolean parameters using 
expressions like:

f(int x){
    … sometemplate!(x*x >= 0) …
}

with x being unknown at compile time.



More information about the Digitalmars-d mailing list