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.

  • Re: checkedint call removal Ola Fosheim Grøstad via Digitalmars-d
    • Re: checkedint call removal Ola Fosheim Grøstad via Digitalmars-d

Reply via email to