Skip to content
FutureBlitz

    Install

    Learn

    Compile-time code

    Have the compiler compute values, read attributes, go over types' fields, and build files into the program.

    Some work is better done once, by the compiler, than every time the program runs. Consts and Const Functions compute values as the program is built. Attributes mark declarations, and compile-time reflection lets generic code go over a type’s fields and Methods, which is how std turns a Struct into JSON. Embedding builds files into the executable. Reflection and Const evaluation are done by the compiler, so they cost nothing when the program runs: FutureBlitz has no run-time reflection.

    Tutorials

    1. Consts and compile-time evaluation Have the compiler work out values before the program runs, with Consts, Const Functions, and
    2. Attributes Mark declarations with the built-in attributes, and declare attributes of your own that generic code reads.
    3. Reflection Go over a type's fields and Methods at compile time, to write code that works for many Structs and Classes.
    4. Embedding files Build files into the executable with Embed, EmbedText, and EmbedFolder, so a program ships as one file.

    The rules behind this area are in the language reference.

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