On Thursday, 11 April 2013 at 08:36:13 UTC, Joseph Rushton
Wakeling wrote:
On 04/10/2013 08:39 PM, Walter Bright wrote:
Sure there is. Declare the function as pure, and the
function's parameters as
const or immutable.
Sure, I accept that. What I was meaning, though, was an
up-front declaration
which would make the compiler shout if those necessary
conditions were not met.
i.e.
pure foo(int n) { ... } // compiles
strong pure bar(int n) { ... } // compiler instructs you
to make
// variables const or
immutable
Both are strongly pure.