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)
- 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)
- Memory safety with no garbage collection, no pointers, no manual memory management using compile-time exclusivity checking (similar to Rust borrow-checking but without the lifetime annotations)
- Compiles to LLVM IR textual format which can then be compiled to various format - Web Assembly, native code etc
- 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
Compilation debugger
Graphics library