News for hackers. Stuff that matters.
Re:Why care about functional programming? Part 1: Immutability by tel on Thursday March 19, 2015 @05:37PM (#9234764)
Obviously this is just a short fragment and explicitly it's a straw man, but I can't help but get this incredibly strong feeling that this code is immutability bolted on instead of embraced. Lenses, yes, could be used to solve something like this, but it feels like you're facing a problem which is better avoided than fixed.

I'm not really trying to rain on your tirade---surely there are ways to misuse immutability---but I can't look at this example and not feel that immutability is telling you something about a better architecture.

Re:Why care about functional programming? Part 1: Immutability by taeric on Thursday March 19, 2015 @06:12PM (#9234930)
Oh, I certainly agree. And really... this is my point. Misused immutability is just as garbage heavy as misused mutability. It does not, ipso facto, prevent bugs or make threaded code easy to do.