phetsims / phet-core

Core utilities used by all PhET simulations.
MIT License
8 stars 6 forks source link

Does Enumeration need VALUES? Does it need to be public? #48

Closed samreid closed 5 years ago

samreid commented 5 years ago

From #42 @pixelzoom said:

  • [ ] Do we really need the VALUES field? If yes for internal reasons, does it need to be public?
samreid commented 5 years ago

@jonathanolson said:

Yes, it's super helpful to be able to iterate over all possible options in an enumeration.

samreid commented 5 years ago

I agree it is useful to iterate over enumeration values, and this is also helpful in Property validation via validValues: MyEnumeration.VALUES. @pixelzoom sound ok?

pixelzoom commented 5 years ago

OK. But VALUES needs to be frozen.

samreid commented 5 years ago

Values are frozen as described in https://github.com/phetsims/phet-core/issues/46, unless I'm misunderstanding something. Please clarify.

pixelzoom commented 5 years ago

I reviewed this issue before seeing #46, where I see that VALUES is now frozen. Closing.