Skip to content
Discussion options

You must be logged in to vote

Hi @gkaimakas, I'm not aware of any real limitation, but also it does not seem optimal to hold 6 optionals in state. That consists of 2^6 = 64 different states of being nil or non-nil. Are all of those states valid?

It seems more likely that only one of those values can be non-nil at a time, in which case an enum is better suited. You may be interested in our article on Tree-based navigation.

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@stephencelis
Comment options

@kyleolson812
Comment options

@kyleolson812
Comment options

@AlessandroSteri
Comment options

@kyleolson812
Comment options

Answer selected by gkaimakas
Comment options

You must be logged in to vote
1 reply
@mbrandonw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants