Sum types and default initialization can make maintenance difficult. #22535
gchumillas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think default initialization should not be allowed in sum types, as it leads to unpredictable behavior, making maintenance difficult. For exampe:
However, since I am a perfectionist, I will order the types alphabetically, and we obtain a different result:
Thank you! I'm in love with this language :)
Beta Was this translation helpful? Give feedback.
All reactions