Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by clhodapp on Thursday July 13, 2023 @08:16PM
(#36717845)
Simple! You just make f take in g's result type.
[ Parent
| on HN ]
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by rogerkeays on Friday July 14, 2023 @12:10AM
(#36719394)
... not sure if serious or not
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by clhodapp on Friday July 14, 2023 @12:14AM
(#36719413)
I'm completely serious in the sense that you could do that and really would in some situations.
You might do it because you want to factor the handling of the different result cases out to another function.
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by rogerkeays on Friday July 14, 2023 @04:17AM
(#36720866)
You don't think it would limit the independent use of f()?
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by masklinn on Friday July 14, 2023 @10:44AM
(#36724723)
No? Surely if f() takes a full result (including error condition) it's because there's something it wants to do with that?
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by EspressoGPT on Friday July 14, 2023 @02:20AM
(#36720129)
Very serious. https://pkg.go.dev/text/template#Must