Accidentally replied to your private email first.

On 09/08/2012 12:55 AM, Minas wrote:
import std.stdio;

enum PI = 3.14;

void main()
{
     writeln(typeid(typeof(PI)));
}

It prints "double". Shouldn't it be immutable(double).

No.

auto x = PI;
x++;

I think it would  make more sense, as it is a constant.

It never makes sense to have mutable values, but their type may still allow mutation of variables of that type.

Plus, it could be shared among threads.

The symbol PI does not exist at runtime.

Reply via email to