When declaring a variable, we may add const or immutable to its type.

```
const     int a = 86; // typeof(a).stringof is const(int)
immutable int b = 99; // typeof(b).stringof is immutable(int)

const int[] array_a = [42, 100]; // typeof(array_a).stringof is const(int[]) immutable int[] array_b = [42, 100]; // typeof(array_b).stringof is immutable(int[])
```

They seem to have identical behavior, at least in the simple case.

My question is how does D treat these types differently?
When should one pick one vs. the other?

Reply via email to