Algebraic Data Type
Define your own algebraic data types with @data macro.
@data Message begin Quit struct Move x::Int y::Int end
Write(String) ChangeColor(Int, Int, Int)endAlgebraic Data Type
Define your own algebraic data types with @data macro.
@data Message begin Quit struct Move x::Int y::Int end
Write(String) ChangeColor(Int, Int, Int)endDerive Macro
Derive other methods from your type definitions (normal Julia struct or @data) with @derive macro.
@derive Message[Show, Hash]Pattern Matching
@match value begin Message.Move(; x, y) => (x, y) Message.Quit() => 0 Message.Write(msg) => msg Message.ChangeColor(a) => aend