On Tuesday, 21 October 2014 at 08:25:07 UTC, bearophile wrote:
Minas Mina:

Aren't pure functions supposed to return the same result every time? If yes, it is correct to not accept it.

But how can main() not be pure? Or, how can't the 'a' array be immutable?

Bye,
bearophile

There can exist a mutable reference to a's underlying memory:

const int[] a;
int[] b;

static this()
{
    b = [1];
    a = b;
}

Reply via email to