Why static typing
Formulas are written once and run for years
In a spreadsheet, a bad formula shows #VALUE! the moment it
is typed, and its author fixes it. In your software, a formula is
written once and runs weeks or months later, on someone else's data, far
from whoever wrote it. fxEngine moves every check it can to the moment
the formula is written.
Total is 5940, Threshold is the text
"5000", as read from a CSV file, and Due is March 31, 2026.
| Formula | A spreadsheet answers | fxEngine answers |
|---|---|---|
Total + ThresholdTotal + Threshold | A spreadsheet answers 10940 The text is quietly converted to a number. | fxEngine answers Type mismatch. The type of the operand "Threshold" is expected to be Number, but it is Text.Type mismatch. The type of the operand "Threshold" is expected to be Number, but it is Text. |
Total > ThresholdTotal > Threshold | A spreadsheet answers FALSE All text is ordered after all numbers. | fxEngine answers Type mismatch. The operand "Threshold" must have the same type as the other operands of ">": it is expected to be Number, but it is Text.Type mismatch. The operand "Threshold" must have the same type as the other operands of ">": it is expected to be Number, but it is Text. |
Due / 2Due / 2 | A spreadsheet answers 23056 A date is a number of days since 1900. | fxEngine answers Type mismatch. The type of the operand "Due" is expected to be Number, but it is Temporal.Type mismatch. The type of the operand "Due" is expected to be Number, but it is Temporal. |
-
Caught as it is typed
A formula is checked as a whole before it runs, so a mistake in a branch that rarely runs is caught too.
-
Messages for people
A message names what is wrong, what was expected and what was found, and can be worded for spreadsheet users rather than programmers.
-
The whole model at once
Names that no longer exist and circular references are caught across every formula of a model, not one formula at a time.