scala Enum
When I started at foursquare >1yr ago, I tried to get us off scala.Enumeration. Failure to do so coming back to bite me: http://t.co/y1pTtXQ
2011-07-29 07:56:39@krave Unclear. My preference is for sealed traits and case objects, but there's no feature parity (you get no "enumeration" of the values).
2011-07-29 22:39:29@krave I've heard some people just use Java Enums and keep those in .java source files. That would probably be the easiest/stablest bet.
2011-07-29 22:40:11@jorgeortiz85 @djspiewak is there a good alternative to Enumeration, or do you roll your own?
2011-07-29 22:45:46@sintactic @djspiewak No. My preference is sealed traits and case objects, but that lacks a key feature (an enumeration of the values).
2011-07-29 22:52:44@jorgeortiz85 @sintactic See @viktorklang. You can get the best of both worlds by adding values to a Vector in the trait constructor.
2011-07-29 23:38:53@djspiewak @jorgeortiz85 @sintactic Here it is, also check the discussion below: http://t.co/XWlz652
2011-07-29 23:41:06