Enums and Unions are currently unsupported in the language completely. In order to make the language more type safe, unions will likely be removed. Enums could be implemented in three ways.
C - style
Enums are not namespaced in any way, and are just there to give names to sequential numbers.
This is a very simplistic implementation and is not very useful.
Namespaced Enums
Enums members can only accessed using the name of the Enum type. Additionally, enums of different types can't be equated.
Namespaced Enum Objects
Enum members are objects. The enum declaration could include constructors that the members must all call in order to be valid. In addition, enum declarations could have methods, and implement traits.
Enums and Unions are currently unsupported in the language completely. In order to make the language more type safe, unions will likely be removed. Enums could be implemented in three ways.
C - style
Enums are not namespaced in any way, and are just there to give names to sequential numbers. This is a very simplistic implementation and is not very useful.
Namespaced Enums
Enums members can only accessed using the name of the Enum type. Additionally, enums of different types can't be equated.
Namespaced Enum Objects
Enum members are objects. The enum declaration could include constructors that the members must all call in order to be valid. In addition, enum declarations could have methods, and implement traits.