It's nice to see that immutable types have been added to Julia.
1. I'm wondering if there is a reason not to have types immutable by default?
The advantages are clear: the compiler can take advantage of the fact that the type is immutable. In addition, it's easier to reason about the instances of the type.
From my experience with some medium-size projects in F# regarding numeric computation, I can say it that for me it was not a constraint at all. I did not have to create a mutable type at all for these projects. Of course, an array for example has to be mutable: if you have a large matrix, then you cannot afford to make lots of copies of it, so you should be able to modify its elements in place. But it could be advantageous if the elements it contains are immutable.
By making types immutable by default, you encourage the user to declare them that way.
2. Furthermore, what about immutable variables/bindings?
With a light-weight syntax, this is not cumbersome. In addition, you see it explicitely when something is mutable.
E.g. immutable binding (standard):
E.g. mutable binding:
mutable x::Int = 3
x <- 5 #no error
I'm just thinking, please give me your thoughts.