Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.4.0 #110

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Release 0.4.0 #110

merged 1 commit into from
Jan 29, 2025

Conversation

density215
Copy link
Member

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 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.

@density215 density215 merged commit 50d1982 into main Jan 29, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant