dl at cs.oswego.edu
Sun Dec 30 14:30:49 EST 2012
On 12/30/12 10:35, Zhong Yu wrote:
> Also I wish `fn` can throw checked exception that is delivered to the
> destination future unwrapped.
Sorry, mixing checked exceptions and lambdas is too nightmarish.
It is a sure bet that as lambdas become more commonly used, checked
exceptions will become less commonly used.
> If we smuggle a check exception in a
> RuntimeException, it's a bit of work to uncover it later without
> ambiguity; I wished there's a dedicated java.lang.SneakedException for
> the sole purpose of smuggling checked exceptions.
It might be a good idea to institute a JDK-wide convention
about a specific RuntimeException to use in these situations.
I'll explore this. For now though, just RuntimeException
itself is the only reasonable choice.
More information about the Concurrency-interest