Agnostic
Agnostic is a statically typed, imperative language. The reference implementation is a compiler written in C++20 with three code generation backends: a native machine code backend built on the LLVM C++ API (llvm), a bytecode backend for the Novaria Virtual Machine (nvm), and a stub backend for libgccjit (gcc, not implemented).
The language has functions, function values and closures that capture variables by reference, structs with methods but no inheritance and no vtables, and comptime blocks that select code at compile time based on target OS, target architecture, or memory mode. Generics and pattern matching do not exist. See Types for what the type system covers instead.
Executables produced by the llvm backend do not link against libc. They call the Linux kernel through raw syscalls and pick a memory management strategy at build time: automatic reference counting (arc, the default), manual allocation with no automatic freeing (manual), or per-function region allocation (orc). Details are in Toolchain.
- Getting Started: build the compiler, compile a program, run it.
- Syntax: packages, functions, variables, comments, operators, string interpolation.
- Types: the type system.
- Control Flow:
if,for,break,continue. - Functions and Closures: function values and capture semantics.
- Structs: fields, methods, struct literals.
- Comptime: compile-time conditionals.
- Modules:
import, module resolution, calling functions across modules. - Standard Library:
stdio,math,string,novaria. - Toolchain: CLI flags, backends, memory modes, packaging.