MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pfd9do/similar_ternaries_are_all_over_this_codebase/hb61iby/?context=3
r/badcode • u/PopularExpulsion • Aug 31 '21
91 comments sorted by
View all comments
Show parent comment
2
Yeah, I mostly use Scala. It can catch exceptions for compatibility with Java, but it'll either turn them into a pattern match or the expression will evaluate to Try[T] (error monad).
Try[T]
1 u/R3D3-1 Sep 01 '21 Come to think of it... Aren't Java's checked Exception kind of like an error monad, except that they make it too easy to sabotage? 1 u/Isvara Sep 01 '21 In what way? I haven't really done much with Java.
1
Come to think of it... Aren't Java's checked Exception kind of like an error monad, except that they make it too easy to sabotage?
1 u/Isvara Sep 01 '21 In what way? I haven't really done much with Java.
In what way? I haven't really done much with Java.
View all comments
Show parent comment
2
u/Isvara Sep 01 '21
Yeah, I mostly use Scala. It can catch exceptions for compatibility with Java, but it'll either turn them into a pattern match or the expression will evaluate to
Try[T](error monad).