The Stardust Programming Language

Types as First Class Citizens

C++'s template metaprogramming is incredibly powerful, but the syntax is awful. In Stardust, types are objects and can be passed to and returned from functions like any other objects. Where C++ has template classes, Stardust has functions that accept types and return local classes that operate on those types.

Compile-Time Code Execution

Another aspect of metaprogramming is running code at compile time. Stardust syntax makes it clear whether code will run at runtime, compile time, or either time. Exceptions thrown at compile time are reported during compilation and can be debugged on the spot - no messy template instantiation errors that are hard to read and confusing to debug.

No Garbage Collection

A disturbingly large number of languages have forced or default garbage collectors, even though garbage collection isn't always the best way to handle memory and memory isn't the only resource that can be leaked. Stardust borrows C++'s RAII - that is, object lifetime is bound to scope, and destructors are deterministic (and therefore useful for more things than just memory). Object lifetime is simple to understand and hard to get wrong.

Dynamic Module Loading

Load pre-compiled code modules at compile-time and runtime without worrying about incompatible statically linked libraries or other such nonsense. Loading a module is as simple as passing in parameters to the module's compile-time code and being given a namespace in return which contains the module's public interface. You can even load the same module multiple times with different parameters, or even the same parameters.

This is inscredibly useful for games which want to support modding/plugins - each mod/plugin is just a Stardust module that gets loaded. Pass your public API namespace as a parameter to the module and get its public API namespace in return, no fuss.

How do I get started?

If you're just passing by, come back in a few years. There's currently no compiler and no formal specification, and it's going to be a while before any of that happens. Any help and feedback is appreciated, though - language design isn't easy, and early mistakes can be permanent.