3 ms·
> They just released a proposal that effectively side-steps the problem of checked-exceptions-in-lambdas. The main problem of checked exception in lambdas is t
by ackfoobar 3y ago
> They just released a proposal that effectively side-steps the problem of checked-exceptions-in-lambdas.
The main problem of checked exception in lambdas is that Java's type system does not allow expressing statements like "`forEach` throws whatever the lambda throws". Here are two links:
http://james-iry.blogspot.com/2012/02/checked-exceptions-might-have-their.html http://james-iry.blogspot.com/2012/02/checked-exceptions-mig...
https://blog.jooq.org/javas-checked-exceptions-are-just-weird-union-types/ https://blog.jooq.org/javas-checked-exceptions-are-just-weir...
The proposed syntax puts the exceptions on equal footing with the happy path. Not a bad idea, but irrelevant to the main problem.