2 ms·
> More generally though, I wish we could avoid having exceptions to begin with. What's the reason behind their prevalence in almost every language? Because nob
by lenkite 2y ago
> More generally though, I wish we could avoid having exceptions to begin with. What's the reason behind their prevalence in almost every language?
Because nobody really wants low-level stuff like divide by zero, memory errors, index out of bounds wrapped as a `Result type ? Both Rust and Go have panics. Every function would effectively return a `Result` type since any non-constant expression can hypothetically return an error.