Argument Storage

14 December 2020 — Bryan Mehall

As it's currently designed, arguments in lynx are evaluated by passing around a state object with the lynx expression. Whenever the functional evaluator reaches an argument it looks for that argument by name in the argument list and substitutes the value. The state object *should* be a read only value for every module function call which greatly simplifies the logic. However it is still not as clean as just passing around the lynx expression. For this reason it would be better if arguments were passed into the lynx expression by value.

The question is how to get the locations in the tree of the arguments so the values can be inserted. Should these be mutable so it is just at a constant reference location/pointer location? Or would this strategy cause problems?