A minimal systems programming language that compiles to native executables via C++23. Write clean, readable code with seamless access to the entire C/C++ ecosystem.
Watch an introduction to the Myra programming language.
Every feature serves a purpose. Nothing more, nothing less.
45 keywords and 9 built-in types. No classes, no interfaces, no generics. Just the essentials for writing clear, maintainable code.
If it's not Myra, it's C++. Mix freely with raw C++ blocks, call any C/C++ library, and leverage the entire ecosystem without wrappers.
Records extending records with automatic virtual dispatch. Get polymorphism without the complexity of class hierarchies.
Full try/except/finally support with proper stack unwinding. Handle errors gracefully with familiar Pascal-style syntax.
Build executables, static libraries, or dynamic libraries. Export functions with C or C++ ABI using simple directives.
Cross-platform builds powered by Zig. Compile to Windows, Linux, macOS and more from a single codebase with zero configuration.
Built-in source-level debugger with breakpoints, stepping, variable inspection, and stack traces. DAP support for IDE integration.
Control your build with simple directives. Set #TARGET platform, #OPTIMIZATION level, #APPTYPE, #LINK libraries, and configure paths.
Clean syntax meets modern capabilities.
(* Simple Hello World in Myra *) module exe HelloWorld; import Console; var Name: STRING; begin Name := 'World'; Console.PrintLn('Hello, {}!', Name); end.
(* Type extension with virtual dispatch *) module exe Shapes; import Console; type TShape = record X: INTEGER; Y: INTEGER; end; TCircle = record(TShape) (* extends TShape *) Radius: INTEGER; end; (* Base method *) method Describe(var Self: TShape); begin Console.PrintLn('Shape at ({}, {})', Self.X, Self.Y); end; (* Override with inherited call *) method Describe(var Self: TCircle); begin inherited Describe(); Console.PrintLn(' Radius: {}', Self.Radius); end; var Circle: TCircle; begin Circle.X := 100; Circle.Y := 200; Circle.Radius := 50; Circle.Describe(); (* Calls TCircle's method *) end.
(* Seamless C++ integration *) module exe CppDemo; (* Raw C++ block for includes and declarations *) #startcpp #include <vector> #include <algorithm> std::vector<int> numbers; #endcpp import Console; var I: INTEGER; begin (* Call C++ directly in Myra code *) numbers.push_back(42); numbers.push_back(17); numbers.push_back(99); std::sort(numbers.begin(), numbers.end()); for I := 0 to numbers.size() - 1 do Console.PrintLn('Value: {}', numbers[I]); end; end.
(* Exception handling with try/except/finally *) module exe ErrorHandling; import System, Console; routine ProcessFile(const APath: STRING); var Handle: INTEGER; begin try Handle := OpenFile(APath); ReadData(Handle); except Console.PrintLn('Error: {}', System.GetExceptionMessage()); finally CloseFile(Handle); Console.PrintLn('Cleanup complete'); end; end; begin ProcessFile('data.txt'); end.
Modern languages keep adding features. Myra takes the opposite approach, removing everything that isn't essential. The result is a language that's easy to learn, easy to read, and practical for real work.
Inspired by Niklaus Wirth's Oberon—itself derived from Pascal—Myra proves that simplicity isn't about being limited—it's about being focused. Type extension gives you polymorphism. C++ interoperability gives you power. Together, they let you build anything.
"Make it as simple as possible, but no simpler." — Albert Einstein
| Feature | Myra | Delphi |
|---|---|---|
| Keywords | 45 | 60+ |
| Classes | Type Extension | Full OOP |
| Subroutines | routine | procedure/function |
| C++ Interop | Native | External |
| Memory | Manual | Manual |
| Target | Native | Native |
Up and running in minutes.
Batteries included — Zig compiler, LLDB debugger, and raylib bundled.
github.com/tinyBigGAMES/Myra/releasesInitialize a new executable project.
myra init HelloWorld
cd HelloWorld
Compile to native executable and run.
myra build
myra run