In Google Go, I read that Strings are immutable, ok but are int's? What about other types? As a slightly older programmer I prefer mutability even though I know the benefits of immutability, I prefer to live dangerously.
Know what types are mutable or immutable would be very helpful.
Update, what I am mostly concerned about is the practical issues depending upon the type being mutable or immutable. As in the typical example in Java, if you create a String in a loop and loop for 10,000 times, you will get 10,000 String's created which are then later garbage collected. This has actually been a serious issue in a project in a company I worked at.
The the question is, does Go's Immutability in some cases cause the same problem?
It affects how you should treat the var. (or I assume it does).
Update again, I am also concerned about other practical concerns. Knowing that something is immutable means that I can write code which is parallel and updates to one reference of the object should not update the other references. However sometimes I wish to do dangerous things, I want mutability.
These are consequences of mutability vs immutability and affect how I can write the code.
[]byte
then, caveat being that in full blown utf-8 character (aka rune) has variable length. – ypb