Remix.run Logo
throwaway27448 7 hours ago

Why people ascribe error handling practices to languages is baffling. What language doesn't allow punting error handling until later? Even Haskell has "panic" functionality that fudges the type constraints to allow this.

pdpi 5 hours ago | parent [-]

EAFP is an explicit part of what makes code "pythonic", and the Zen of Python (`import this`) has the lines "Errors should never pass silently. Unless explicitly silenced." Java has checked and unchecked exceptions. Rust has panics and Result<T, E>, and the ? operator.

The way a language's community handles errors and how the language itself handles errors are different things, sure, but they're not independent of each other.

That said, OP's snark against Rust is completely unmerited, and they can take my `impl From<OtherErr> for MyErr` from my cold dead hands.

throwaway27448 an hour ago | parent [-]

Sure, but you can write bad code in any language. There are few languages where representative code shirks this interest. (PHP? Javascript? Idk what else to list.)