News for hackers. Stuff that matters.
Re:Software development topics I've changed my mind on after... by Terr_ on Wednesday February 05, 2025 @01:27PM (#42952933)
And that is extremely good compared to the same function-writer adding or changing their non-checked exception, for which an 1+ levels removed consumer gets no warning at all until the pager goes off because the system broke in production.
Re:Software development topics I've changed my mind on after... by baq on Wednesday February 05, 2025 @01:37PM (#42953062)
Unless the library upgrade is also fixing a 9.9 CVE.
Re:Software development topics I've changed my mind on after... by Terr_ on Wednesday February 05, 2025 @02:01PM (#42953429)
That same scenario (an emergency version-change to a direct dependency) could also remove a function that your code calls! Yet that does not mean mean compiler-checks are bad, or that the solution is to make a system that lets you yeet it into production anyway.

Look, I get it: Sometimes a Checked Exception defined in a niche spot "infects" higher-level code which adds it to their signatures, because nobody takes the time to convert it into something more layer-appropriate.

But that is the exact same kind of problem you'd also get when library's NicheCalculationResult class is trickling upwards without conversion too! However nobody freaks out over that one. Not because it's mechanically different, but because it's familiar.

Re:Software development topics I've changed my mind on after... by baq on Wednesday February 05, 2025 @02:35PM (#42953897)
> That same scenario (an emergency version-change to a direct dependency) could also remove a function that your code calls!

absolutely, but the catch is it doesn't affect me transitively. the immediate caller must deal with the issue somehow. with exceptions, this it is expected to not handle the ones you have no business handling, so you should change your signature. this propagates upwards and there is no layer of abstraction that can handle this problem without breaking the world. the only somewhat sane way is wrapping the new exception is something that you already handle - if that makes logical sense, which it very well might not.

> NicheCalculationResult class is trickling upwards

yes, and yes people do freak out, not sure why you think they aren't :)