News for hackers. Stuff that matters.
Re:Ask HN: What are some of the most elegant codebases in yo... by kaba0 on Sunday June 18, 2023 @04:55AM (#36378464)
From your repo: Respectfully, I disagree that checked exceptions are a misfeature. Java’s implementation definitely leaves a lot to be desired (inheritance doesn’t make sense for them), but otherwise checked exceptions are a better form of Result types.
Re:Ask HN: What are some of the most elegant codebases in yo... by The_Colonel on Sunday June 18, 2023 @05:09AM (#36378536)
Unchecked exceptions are the better version of Result type.

The problem with checked exceptions is that methods throwing them force its callers to react to the even if they are irrelevant to them. In 99% of cases I don't have any JSON specific error handling, yet Jackson forces me to do a try-catch-rethrow ceremony in thpse 99% to declare I don't want to do anything specific.

Re:Ask HN: What are some of the most elegant codebases in yo... by kaba0 on Sunday June 18, 2023 @05:35AM (#36378657)
That’s the not too comfortable part. But with a tiny bit of syntax sugar (say, a ! or ? that expands to a mini-try-catch block) it would be more than fine.
Re:Ask HN: What are some of the most elegant codebases in yo... by The_Colonel on Monday June 19, 2023 @03:04AM (#36388138)
Yes, I would be fine with a shorthand syntax like that. But it's not available which makes checked exceptions more trouble than worth.