Blyx v0.1.0-alpha: AI-Native Systems Language with Rust Runtime •View on GitHub

Chapter 7

Pattern Matching

Blyx has an extremely powerful control flow construct called match that allows you to compare a value against a series of patterns.

match msg {
    Message::Quit => println!("Quitting"),
    Message::Move { x, y } => println!("Move to {}, {}", x, y),
}
Structs & EnumsTraits & Generics