Skip to content

Getting Started

Welcome to Filtrera, a minimalistic and expressive domain-specific language designed to capture intent rather than describing algorithms. This guide will help you understand the basic structure of the language and walk you through a simple “Hello World” example.

Language Structure

Filtrera is designed with simplicity and clarity in mind. Here are some key features of the language:

  • Pure Functions: Filtrera scripts are pure, meaning they have no state or mutations. The same input will always produce the same output.
  • No Conditional Loops or Recursion: This design avoids the halting problem, ensuring that scripts are predictable and safe.
  • Strict Type System: Filtrera minimizes the need for explicit type declarations while maintaining strong type safety.
  • Domain-Specific Extensions: The parser and runtime can be extended for specific applications, making Filtrera highly adaptable.

Basic Elements

  1. Statements: The main building blocks of a Filtrera program. A program consists of a series of statements that produce the desired outcome. Statements are made up of smaller parts called expressions.
  2. Expressions: Pieces that represent values or actions within statements. Expressions can be things like numbers, text, or calculations. They can also include nested blocks of code.
  3. Functions: Predefined actions that you can use in your expressions. Functions help you perform tasks like math operations, text changes, or data handling.
  4. Filters: Tools to change or extract data from any kind of input. Filters enable code that reads almost like natural language, making it easy to understand and use.
  5. Symbols: Names that stand for values or actions. You use symbols to define things like constants and functions in your Filtrera programs.
  6. Pattern Matching: A way to handle different types of data by setting up different actions for each type. Pattern matching helps your program decide what to do based on the input it receives.

”Hello World” Example

Let’s start with a simple example to demonstrate how Filtrera works. This example will show you how to define and output a basic “Hello World” message.

Example Script

// Define a constant with the message
let message = 'Hello, World!'
// Output the message
from message

The from statement outputs the value of the message constant.

Playing with Filtrera

You can experiment with Filtrera and try out your own scripts in the playground. Visit the Filtrera Playground at playground.filtrera.io to get started.


This guide has introduced you to the basic structure of Filtrera and walked you through a simple “Hello World” example. As you continue exploring, you’ll discover the power and flexibility of Filtrera in capturing and expressing your intent clearly and efficiently. Happy scripting!