Skip to content
FutureBlitz

    Install

    Spec

    FutureBlitz Language Specification (v0)

    Status: Locked unless a section says otherwise.

    Code examples use ```vb fences for approximate syntax highlighting.

    #Chapter
    01Lexical structure
    02Types, declarations, conversions
    03Operators
    04Control flow
    05Functions and closures
    06Structs, classes, interfaces, enums
    07Generics
    08Memory model and unsafe code
    09Error handling
    10Concurrency
    11Modules and packages
    12FFI
    13Compile-time features
    14Strings and collections

    A taste

    Import std.math
    
    Class Enemy
        Public Field name: String
        Field hp: Int = 100
    
        New(name: String)
            Self.name = name
        End New
    
        Method Hurt(amount: Int)
            hp -= amount
            If hp <= 0 Then Print("{name} died")
        End Method
    End Class
    
    Local enemies: Enemy[] = [Enemy("grunt"), Enemy("boss")]
    
    For e In enemies
        e.Hurt(150)
    End For

    Report an issue with this page or with FutureBlitz on GitHub.