@Carols10cents So, I'm reading your book and I am struggling with enums.
You say they are algebraic, but i can't do math with them.
And I am trying to figure out why I should use them (except option)
what am I missing (3rd iteration re-reading this chapter)
-
-
Okay that makes sense. So it's really best with match and a way to get rid of switch case errors? And less for say, defining my own algebraic number set? Or am i just hopeless?
-
Yes! Enums are great with match! And yeah, I wouldn't recommend implementing algebra yourself unless you really want to :)
- 1 more reply
New conversation -
-
-
So for example, on the website in your bio, the menu could be represented by an enum: enum Menu { Home, Web, Articles, Pictures, } and every page you have would be in one of those 4 categories. Does that help?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.