Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: