Talk:Requests for comment/Typesafe enums

Looking forward to using it!
That's a really solid proposal and code. The only suggestions I have are:
 * Don't worry about the "final" class tags, it doesn't really belong in the reference implementation. Developers know they can use final if they really want, and it's a bit distracting from your point.
 * Maybe add more basic language constructs to the unit tests to dispel any potential anxiety. For example, in_array, array_search, and switch.

Can I also say, that is some really clean code? Adamw (talk) 21:26, 16 May 2014 (UTC)

Database Safety
Since there is no guarantee that the internal values will remain the same, how would one store an enum value in a database? Doing so as a string is not desirable since string indicies are large and inefficient compared to integer indicies. (I think what I'm trying to get at is that there should be some way of explicitly specifying an integer per enum 'constant'.) Mwalker (WMF) (talk) 23:00, 16 May 2014 (UTC)

Bitmask Enums
Sometimes it's nice to have a bitmask as an enum; it would be really cool if those could be automatically generated too in some sort of database safe fashion. Mwalker (WMF) (talk) 23:29, 16 May 2014 (UTC)