Re:JEP draft: Exception handling in switch
by bedobi on Friday April 19, 2024 @04:20PM
(#40091511)
it's literally not, I'm sorry but folks who think this (and it's extremely common) simply haven't familiarized themselves with the differences
[ Parent
| on HN ]
Repeating the same stuff won’t make it true.
Re:JEP draft: Exception handling in switch
by ackfoobar on Friday April 19, 2024 @04:53PM
(#40091781)
Going off-topic, I've been on both sides of seeing the analogousness or not. I think there might be two modes of thinking for deciding whether two things are analogous.
Mathy people inspect the "shape" of, and interactions within the two things. Other people go for intuitive vibes. For more concrete stuff the two modes of thinking usually match up.
Summation and multiplication are literally different things, but a lesson in group theory tells you (ℝ, +) and (ℝ⁺, ×) are isomorphic.
Something being analogous to something else means, that there is a bidirectional function/mapping between the two.
One can easily map any Result-typed expression to a checked exception one, and vice versa.