3 ms·
A mutable variable causes even more "connections" as every function that touches that variable is tied to it. If you construct your program via the point free
by crimsonalucard 7y ago
A mutable variable causes even more "connections" as every function that touches that variable is tied to it.
If you construct your program via the point free style using function composition, the dependent function can easily be swapped out of the composition and replaced with the modified function that you need while maintaining DRY to the maximum possible effect.
You are talking about a fundamental question of program design that is largely solved by functional programming via the point free style.
It is talked about here:
https://www.quora.com/Is-senior-full-stack-engineer-Ilya-Suzdalnitski-right-that-theres-no-objective-evidence-that-object-oriented-programming-OOP-is-better-than-plain-procedural-programming-And-is-OOP-in-fact-a-trillion-dollar-disaster/answer/Bernard-Yip-2?__filter__=all&__nsrc__=1&__sncid__=4130557631&__snid3__=6754155159 https://www.quora.com/Is-senior-full-stack-engineer-Ilya-Suz...
- thaumasiotes 7y ago> A mute-able variable This would be a variable that can be muted. More commonly, when people refer to "mutable" variables, they mean variables that can be mutated. It's not clear what muting a variable would mean.
- crimsonalucard 7y agoSometimes a human makes a spelling error by accidentally placing a hyphen in the middle of a word. From context, hopefully other humans will recognize the slight error and comment on the topic rather than walk away totally befuddled and comment only on the error. Do you not understand what I am saying in the comment? It's too late for me to edit the comment, but I hope the meaning is clear despite the slight error.
- dang 7y agoI've fixed the typo ('mute-able' -> 'mutable') in your comment above.
- dang 7y agoPlease don't be unnecessarily pedantic on HN. This is covered by the site guideline: "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html