News for hackers. Stuff that matters.
Re:Where Everything Went Wrong: Error Handling and Error Mes... by simiones on Monday February 22, 2021 @02:52PM (#26229648)
> even if it's by punting further up the call stack with more "?"

Yes, this is exactly what I meant.

> it is at least explicit in what functions can fail and which don't

So is Java with exceptions (at least as long as developers are even slightly disciplined).

Re:Where Everything Went Wrong: Error Handling and Error Mes... by sensitive-ears on Monday March 01, 2021 @06:12PM (#26309797)
Yeah, I think java had the right idea, but the ergonomics didn't turn out great, so they didn't get the buy in they'd hoped for. Having both checked and unchecked exceptions (ie, NPEs) meant it doesn't offer the same safety guarantees as something like rust does. The implementation of exceptions can also have some implications for the runtime, whereas the enum method of error handling allows you to run in very minimal environments and easily see what's going on. (Exceptions could be implemented this way under the hood, but they often aren't)