Hacker News new | ask | show | jobs
by voxfrege 3960 days ago
> This would mean using a hash set would be out of the question _for passing around outside of an ST monad_ but you could actually use it internally within functions.

Yes, but this is what the author was saying: you end up writing your code in ST. Remeber, there is no (general) way to freeze a mutable collection that was passed and then use it as if it was immutable. There can be a dozen different threads be busy modifying it.

However, as immutable objects are becoming more mainstream even in Java, there will still plenty of opportunities to make polyglot JVM programs employing pure code. Just not with the JAVA collection classes.