- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Home
An experimental, open-source programming language that compiles to .NET IL. fifthlang focuses on clear syntax, strong types, and a pragmatic path from ideas to working binaries.
- Target: .NET (emits IL)
- Language core: expressions, functions, conditionals, loops, classes, properties
- Types: int, long, float, double, bool, string, plus user-defined types
- Status: early alpha (actively evolving)
- License: GPL-3.0-only
Get going:
- Getting Started — build, test, and explore the repo
- Language Guide — syntax, operators, and core constructs
- Examples — short, skimmable snippets
- Recursive Destructuring — powerful nested parameter patterns (beyond C#)
- Contributing — how to help and what to expect
- Roadmap — where we’re headed (and how to influence it)
- Architecture — high-level components and flow
- Next Steps — raw task list driving near-term work
- Language Design - design notes on syntax, semantics and related issues
// Destructure Person -> Vitals -> Height/Weight right in the parameter list
calculate_bmi(p: Person {
    name: Name,
    vitals: Vitals{
        age: Age,
        height: Height,
        weight: Weight
        }
    }) : float {
    return weight / (height * height);
}
- Bind nested properties at the function boundary; no boilerplate in the body
- This direct parameter-list destructuring is not available in C#
- See Recursive Destructuring for details
fifthlang is a space to explore language ideas on solid, modern tooling:
- Modern toolchain: .NET SDK 8; ANTLR-powered parsing; IL code-gen
- Test-first: rich AST, typing, and end-to-end IL tests guide development
- Learnable: small, consistent syntax aimed at contributors new and seasoned
Functions and return types:
main(): int {
  return 42;
}
Basic control flow and operators:
foo(x: int): string {
  if (x <= 15) {
    return "child";
  } else {
    return "adult";
  }
}
Variables and arithmetic (unary/binary ops like +, -, *, /, **, %, ==, !=, <, <=, >, >=, &&, ||):
a: int = 5;
a = a * 6;
Property access:
// given p: Person
p.Weight = p.Weight + 1;
Overloads by signature are supported:
foo(i: int): string { return "child"; }
foo(s: string): string { return s; }
Note: The language is evolving quickly; see Language Guide for current details.
- Parser and AST builder (ANTLR + visitors)
- Type annotation and (emerging) inference passes
- IL code generator with validation
- Comprehensive tests (AST, typing, E2E IL)
Explore the code and issues: https://github.com/aabs/fifthlang
We welcome contributors of all experience levels. Bring curiosity and a willingness to learn—reviews are kind and constructive. See Contributing.
GPL-3.0-only — see the project’s LICENSE.