News for hackers. Stuff that matters.
Re:A first naïve look at Truffle Ruby by thedufer on Friday February 02, 2018 @09:41PM (#16295832)
> Is data changing that big of a problem?

Yes, but it is hard to recognize it as such until you've experienced the alternative.

I don't know much about Kotlin, but the fact that it relies heavily on Java libraries is sufficient to tell me that it is a particularly poor example of the power of immutability. You see the usefulness of immutability when you have objects that are deeply immutable - when you pass them around, you know those functions haven't changed them. It is much easier to reason about deeply immutable objects than mutable ones.

> in immutable languages, are there cases where immutability extends to nonscalar values like arrays or hashes or objects

Yes, this is largely the point. Although, you will rarely see an immutable array or hashtable - more likely it will be a linked list or balanced binary search tree.

Re:A first naïve look at Truffle Ruby by nine_k on Friday February 02, 2018 @11:43PM (#16296232)
Kotlin runs on JVM but it's closer.to Scala, not Java. You can sure have immutable structures all the way down in it, as if it were Haskell. It doesn't enforce this style, though.
Re:A first naïve look at Truffle Ruby by tomc1985 on Friday February 02, 2018 @11:10PM (#16296118)
You're probably right, Kotlin's version of immutability is perhaps not the best example -- pretty sure the whole var/val thing is language sugar which explains why it doesn't work for nonscalars.

Makes sense, I can see the appeal now. Thanks