Syntactic sugar for elementwise operations between arrays #4106
Labels
feature request
New feature or request
scripting
About Typst's coding capabilities
syntax
About syntax, parsing, etc.
Description
Consider
Inspired by Julia, I propose the following syntaxes:
a .+ b
a .- b
a .* b
a ./ b
For elementwise addition, subtraction, multiplication, and division, respectively.
Use Case
This is much simpler than, for instance
Numerical calculations are where Typst can best outperform LaTeX, but some built-in operations are still required.
The text was updated successfully, but these errors were encountered: