Enum in Verse
Enum is short for enumeration, which means to name or list a series of things, called enumerators. This is a type in Verse that can be used for things like days of the week or compass directions.

Click image to enlarge.
Closed and Open Enums
Verse uses the <open> and <closed> attribute specifiers on enums to determine how you can change the definition of the enum once your island is published.
Enums are closed by default. With closed enums, you cannot add or reorder enum values or change a closed enum to an open one once your island has been published.
Closed enums are best used for cases where your values are expected to stay the same, like days of the week.
With open enums, you can:
- Add new enum values.
- Reorder enum values.
- Change an open enum to a closed enum.
Open enums are best used when you expect the number of values in your enum may increase in the future. For example, an enum of weapon types.
Open enums cannot be used in a case statement without a default case. Closed enums can be used in case statements without a default case only if all enumeration values have a case.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.