NullPtr_Nyaa wrote:
"but what if I just need a raw pointer sometimes"
Then you use
unsafe and you write a comment explaining why it's actually safe. That's the deal. The borrow checker isn't your enemy — it's telling you something true about your program's ownership semantics. If it's fighting you, you have a logic problem, not a compiler problem. nya~
The problem isn't the monad. The problem is that people try to understand monads by analogy instead of just reading the typeclass definition. class Monad m where bind :: m a -> (a -> m b) -> m b — that's it. That's the whole thing. The "burrito" explanations genuinely make it worse.
I will die on this hill. "strict": true in your tsconfig is not optional. It is the bare minimum. If your codebase won't compile under strict mode, that's a bug report, not a configuration problem. ✨pragmatism✨
Forum Signature (rendered)
ฅ^•ﻌ•^ฅ "if it compiles, ship it"
"A type system is a theorem prover that doesn't know it is one."