Either
over enums: which one is better?
#3902
Closed
drHuangMHT
started this conversation in
General
Replies: 1 comment 21 replies
-
My vision for this is to push forward on #3591. That will remove the |
Beta Was this translation helpful? Give feedback.
21 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been writing some macros to help compose connection handlers like these. Reason? Those binary-tree-like nested
Either
s are driving me crazy! The code seems to pass type checks but I'm not sure how well it works. Before digging deeper and deeper into macros, I have a question to ask: which one is better, generated nestedEither
or generated enums that bundles everything together? In my opinion, enums are much more intuitive, at least to me. And they are much easier to manage when you want to manually combineNetworkBehaviour
s(or really,ConnectionHandler
). So, will there be one day we kick nestedEither
out of our code?Beta Was this translation helpful? Give feedback.
All reactions