3 ms·
I had to think quite hard about how to express the value of immutability in this; did I communicate the point successfully? I'd love feedback on that part of th
by venantius 12y ago
I had to think quite hard about how to express the value of immutability in this; did I communicate the point successfully? I'd love feedback on that part of the post.
- bmh100 12y agoYou did well, but it could be improved by giving an example of how mutability burned you in the past when trying to debug, or how functions are much easier to reason about, or even how significant state mocking code simply isn't needed (as I have heard is necessary in Ruby). In my own experience, I once built an OO Ruby application that interacted with an internal database to heavily process a CSV file. Dealing with the state of instance variables made debugging maddening. I won't say it had an excellent design, but dealing with shared state made things much worse. If it had been functional and immutable, I wouldn't have had to deal with many bugs I encountered.