Julia LanguageEnums


Syntax

  • @enum EnumType val=1 val val
  • :symbol

Remarks

It is sometimes useful to have enumerated types where each instance is of a different type (often a singleton immutable type); this can be important for type stability. Traits are typically implemented with this paradigm. However, this results in additional compile-time overhead.