Example: It is well known that "Java Strings are immutable", which is a good idea. Yet you can absolutely write: > String str = "hello,"; > str += "world!"; So it's "immutable" for some lawyerish definition which does me no good. If I write a method that depends on s, it will produce different results each time.
> So functional programming should never handle state Not at all. You should know (and be able to enforce) when your code does mutations.