News for hackers. Stuff that matters.
Re:JEP draft: Exception handling in switch by wiseowise on Friday April 19, 2024 @06:17PM (#40092535)
> Result types genuinely are better.

Only if there’s a language support for them. Like Rust, where I can concisely drop out of function if it’s an error case.

https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/sh...

If I have to constantly write

when(result) { Ok -> … Err -> … }

then checked exceptions and throws clause are better.

There are no comments on this comment yet.