This shouldn't be a hard and fast rule for everything. Be treated as guidelines and allow the programmer some wiggle room to reuse variables in situations that make sense.
Going too hard on mutation means you usually end up with larger structures that are recreated completely. Those themselves are then the point of mutation. This can be helpful if the larger object needs a lot of validation and internal cross rules (eg. You can't set 'A' if 'B' is true, you can validate that when recreating the larger object whereas if 'A' was mutable on it's own someone might set it and cause the issue much later which will be a pain to track down).
Anyway the outcome of trying to avoid mutation means instead of simply setting player.score you get something like player = new Player(oldPlayerState, updates). This is of course slow as hell. You're recreating the entire player object to update a single variable. While it does technically only mutate a single object rather than everything individually it's not really beneficial in such a case.
Unless you have an object with a lot of internal rules across each variable (the can't be 'A' if 'B' example above) it's probably wrong to push the mutation up the stack like that. The simple fact is a complex computer program will need to mutate something at some point (it's literally not a turing machine if it can't) so when avoiding mutation you're really just pushing the mutation into a higher level data object. "Avoid mutations of data that has dependencies" is probably the correct rule to apply. Dependencies need to be bundled and this is why it makes sense not to allow 'A' in the above example to be mutated individually but instead force the programmer to update A and B together.
I was on sublime text for the last 12 years. I made the switch to helix and although I missed some features, it's been a great change. I never could get into the vim bindings, but helix's defaults are great and I don't need to go plugin hunting in order to make the editor functional.
There's missing features I really want, but they'll be added eventually. Git blame in line, some scripting support, better find-replace across a project and not just the opened buffers.
Just give it a try for a week or two straight. No using your other editors. Cold turkey. You'll be surprised at how quickly you'll relearn. It took me about three weeks using it full time to get decent. The first day or so were brutal.
Mailing lists are used as a filter to raise the barrier to entry to prevent people from contributing code that they have no intention of maintaining and leaving that to the project owners. Github for better or worse has made the barrier to entry much much lower and significantly easier for people to propose changes and then disappear.
Wow, yeah, it looks like the Duramax engine has a 15-year belt replacement interval that costs $10K at today's rates.
They aren't even trying to hide the whole planned-obsolescence thing at this point. Average age of cars on the road is approaching 13 years now, so someone who buys a Duramax-based vehicle will end up with a metal and plastic brick that costs more to maintain than it's worth, just because of the timing belt alone.
It's 180k miles. It's the 3.0L Duramax because the oil pump is on the backside of the engine using an oil submersed belt rather than a chain or set of gears. So you have to drop the transmission, exhaust, oil pan, and take the back side of the engine cover to replace a belt that should have been a chain. It _may_ be faster, to simply disconnect everything and pull the motor.
Source: I own one of these engines and I dread having to pay ~3k for this maintenance in 3 years. I like the engine, just not this maintenance ticket item.
reply