Radius programming language
Statically typed programming language with an emphasis on metaprogramming and array operations
Experimental, statically typed, low level language with high level features. I want to use it for graphics and audio. Still under construction
See more info at Radius on Github
Current features
- No external dependencies (except bun runtime) and less than 5000 lines of code.
- Static typing with generics - Sizes of structs are known at compile time so can compile to efficient staticly typed bytecode. One-way type inference, no automatic type conversions (except number literals)
- Currently compiles to custom statically typed VM bytecode but in the future other backends will hopefully be supported.
- Dynamic arrays and strings with size field and bounds checks
- Functions are templated and monomorphise to independent functions like C++ templates (rather than Java generics)
- Out of order compilation - implemented using a custom task system and queue where tasks can be paused and resumed
- Experimental web debugger - which lets you step through the compilation of a program and inspect every data struture used by the compiler, including the AST, compiled bytecode etc
- Compile-time closures - Closures that are firstclass at compile-time and are inlined at the callsite. They can be composed and passed around to compile-time functions
- Iterator functions - Very simple to implement, customisable internal-iterator functions that is used by for-loop and has no runtime overhead.
- Zero-overhead transducers - Composable, extensible, higher-order array operations with zero-overhead and fairly simple interface.
- Metaprogramming AST - AST manipulation at compile-time without macros, implemented using a builtin bytecode VM with instructions to create and manipulate AST objects
- Vector value types using metaclasses - for 3d math with basic operator overloading
- Built in windowing and graphics library
- Shorthand array operations - syntax sugar for mapping, zipping and reducing without higher order functions