4 ms·
I've never been a fan of asserting that what the language you're using is defined for is full of good practices. For example, we all know declaration-site mutab
by pie_flavor 5y ago
I've never been a fan of asserting that what the language you're using is defined for is full of good practices. For example, we all know declaration-site mutability causes lots of problems, but immutable-everywhere is not the best solution to it, only the most brute-force. The /best/ solution, something the fun sort of programmer knew well before Rust proved it, is use-site mutability. You can't get anywhere near the same performance with immutable-everywhere without a runtime (or complex rope-model library) specifically designed for it, and it matches the intuitive model anyway (I will never understand the Haskell-aligned habit of asserting that functional matches how you think about code, while pointing at an IO system that involves a function taking the observable universe and returning a modified copy of it).
- josephcsible 5y ago> the Haskell-aligned habit of asserting that functional matches how you think about code, while pointing at an IO system that involves a function taking the observable universe and returning a modified copy of it) The idea is that most code is pure, so we accept a slightly inferior model for code that does IO, in exchange for a significantly superior model for pure code.
- pie_flavor 5y agoAnd the idea is generally wrong; you can mangle code into a pure shape but the conceptual model does usually involve mutation.