Actually, both would be useful. I would like to use the formula as a master where many calculations take place, which then not need to be repeated anymore in a coloring.
UI parameters like @power, which should be passed along, are very important. But calculated variables could also be passed along. You could distinguish them with the "@" character.
GetFormulaValue("@power", @power)
for a UI parameter. (if not exists, no coupling)
GetFormulaValue("value", useValue)
for a variable calculated in the formula. (if not exists, use a fall back code or default value.)
GetFormulaValue returns true, if the variable/parameter exists.
If a UI parameter is passed, the UI could have a coupling option, a checkbox that shows if the value is synchronized with the formula, or when turned off allows the coloring to change the values independently.
If a function is created that can fetch the values and return whether the value actually exists, it becomes easy to write a fallback code if the value does not exist in the formula.
It is a good thing that coloring algorithms can be used in general. But it would also be useful if coloring could be created for a very specific formula.
A kind of standard for UI variables such as @power, @bailout, @isJulia, etc., could also help the coloring algorithms to synchronize the values with other formulas. But this would be something that each user would need to take care of themselves.
(And internally the access to the variables could be optimized some how, so not every access causes a call, but a pointer simply switches to the accessed data...)
(I had thought about stuffing everything including coloring into the formula in one software because synchronizing the values, especially during developing and testing, was so tedious. The mentioned software also still has many bugs and is no longer being developed.)
Actually, both would be useful. I would like to use the formula as a master where many calculations take place, which then not need to be repeated anymore in a coloring.
UI parameters like @power, which should be passed along, are very important. But calculated variables could also be passed along. You could distinguish them with the "@" character.
`GetFormulaValue("@power", @power)` for a UI parameter. (if not exists, no coupling)
`GetFormulaValue("value", useValue)` for a variable calculated in the formula. (if not exists, use a fall back code or default value.)
GetFormulaValue returns true, if the variable/parameter exists.
If a UI parameter is passed, the UI could have a coupling option, a checkbox that shows if the value is synchronized with the formula, or when turned off allows the coloring to change the values independently.
If a function is created that can fetch the values and return whether the value actually exists, it becomes easy to write a fallback code if the value does not exist in the formula.
It is a good thing that coloring algorithms can be used in general. But it would also be useful if coloring could be created for a very specific formula.
A kind of standard for UI variables such as @power, @bailout, @isJulia, etc., could also help the coloring algorithms to synchronize the values with other formulas. But this would be something that each user would need to take care of themselves.
(And internally the access to the variables could be optimized some how, so not every access causes a call, but a pointer simply switches to the accessed data...)
(I had thought about stuffing everything including coloring into the formula in one software because synchronizing the values, especially during developing and testing, was so tedious. The mentioned software also still has many bugs and is no longer being developed.)