Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from NLnetLabs/release-0.4.0
Release 2025-01-29. ### Breaking changes - Filter maps no longer have a `define` and an `apply` block. `let` bindings should be used instead. For example: ```roto # Roto 0.3 filter-map foo() { define { x = 4; } apply { accept x; } } # Roto 0.4 filter-map foo() { let x = 4; accept x; } ``` ### New - Variables can now be created in more places with `let` bindings. `let` bindings replace the `define`/`apply` mechanism and are much more general because they can be used in any block. For example, inside functions or `if`-`else` blocks. The binding is scoped until the end of the block it is defined in. It is not allowed to declare multiple variables with the same name within a single block. - The `String` type was added to represent pieces of text. String literals are enclosed in double quotes (`"`). - It is now possible to declare constants in the runtime for a Roto script. - Similarly, it is now possible to add "context" to Roto scripts. The variables in the context behave like constants, but they can differ between different calls to a script. In other words, constants are defined when the script is _compiled_, context is defined when the script is _run_. ### Bug fixes - 64-bit numbers (i.e. `i64` and `u64`) were not type checked and compiled properly. They are now fixed.
- Loading branch information