Symbolics.jl & @syms?

Just curious… I noticed that the SymbolicUtils.jl documentation (now) uses @syms to create new symbolic variables. The same seems to work in Symbolics.jl and ModelingToolkit.jl.

Is this a change from using @variables, or a macro giving new possibilities?

1 Like

It adds a wrapper to make it act more naturally in Julia functions via dispatch. But under the hood it’s a Sym.

1 Like

Does that mean that in the future, we can always use @syms were we previously have used @variables – and get the added benefit of better dispatch?

(I like the syms name for defining Sym quantities… variables is ok, too, but not all Sym quantities are meant to “vary”. )


1 Like