Better HN
topnewbestaskshowjobs
Log inSign up

hyujwfasdf

1 karma · joined Aug 24, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

If Rust had an equivalent to tuples but for sum types I believe the error ergonomics would be better. This would result in more exact error handling instead of a crate wide error enum that has error states that would never happen. Not to mention the chore of constructing enum wrappers for all error cases.

https://youtrack.jetbrains.com/issue/KT-68296/Union-Types-fo...

https://harelang.org/tutorials/introduction#defining-new-err...