Timeline for Where to store formulas and formula "constants"?
Current License: CC BY-SA 4.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 15, 2018 at 1:34 | comment | added | Caleb |
@RubberDuck Not so much objects as parameters to the formula, but as the source of values for the variables in a formula. E.g. you might have a formula like area = base * height , and you'd tell the formula to evaluate itself in the context of some object that can supply values for base and height , just as a formula in a spreadsheet pulls values from other cells. I'm not suggesting objects as parameters to a formula, but rather one or more objects as context that supplies parameter values. Also, I don't think the OP is concerned with human readability of the formulae in question.
|
|
Aug 14, 2018 at 23:51 | comment | added | RubberDuck | I disagree that calculations should take objects as parameters. Mathematical formulas as much more readable when they take in primitives. I might not object to struct wrappers around primitives if you’re aiming for type safety though. | |
Aug 14, 2018 at 20:01 | history | answered | Caleb | CC BY-SA 4.0 |