Philosophy
Filtrera is designed to function as a foundation for building DSLs (Domain Specific Languages) into any hosting application. It achieves this by being very minimalistic and expressive at it’s core. It’s functional, as opposed to imperative. That means that the language is tailored to capture your intent rather than describing algorithms.
This means that while it will not achieve the same level of efficiency as languages such as C or Rust, you’ll achieve your goal over a cup of coffee instead of a 6 month timespan.
In it’s basic form, it’s completely pure. There are no state or mutations. Instead, it relies heavily on the idea of effects. The output of the program are the instructions for the host to perform. This makes any filtrera script pure in itself, meaning that given the same input, you’ll always get the same input.
Another interesting aspect is that there are no conditional loops or support for recursion. This means that a filtrera program will always exit, avoiding the halting problem. Higher-order functions can still be achieved by allowing functions to be passed to other functions after they are defined.
These properties combined makes filtrera a perfect language to embed in other applications safely.
Strict Type System with Minimal Typing
Filtrera uses a strict type system based on basic type theory. It allows unions and intersection of types as well as negated types. There are no dynamic types.
However, as a programmer you should not need to put in types everywhere. Types can almost always be inferred by the code itself, and hence there is no need to excessively declare types. Coding should be smooth, and the type system is there to help you be more efficient, and provide guard rails to ensure you’re not doing something you’re not supposed to.
Runtimes
The parser and runtime can be extended by a hosting application, to allow for domain specific keywords, functions and operators. This means that any hosting application can easily construct elaborate domain specific languages that increases efficiency both computationally and for developers.
Runtimes are easily built in .NET.