Currently defining expressions that involve complex computation can be quite onerous. For example if the same value, computed from the parameters, needs to be used in multiple places. In functional programming we have let bindings
to deal with this. For example is clojure:
(let [angle-in-radians (deg2radian angle)
axis-unit-vector (normalize axis)]
... computation)
In Vizzy I imagine "let" being a new expression type which when added prompts the user to add local variable names in the same way parameters are added to a custom expression. The expression would then have orange parameter widgets with " = " and a value slot, lastly there would be a single body expression slot.
Currently there is a workaround where if you want to define
someexpression
that needs to compute some values for reuse, you can createsomeexpression_helper
that takes the original parameters (if still needed) and additional parameters to be precomputed. However this annoyingly pollutes the custom expression list with implementation details.