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. Declare the type of a formula, and a mistake is reported where the formula is defined, not where its value is used.
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 Expected a number but found a text string insteadExpected a number but found a text string instead |
Total > ThresholdTotal > Threshold | A spreadsheet answers FALSE All text is ordered after all numbers. | fxEngine answers This is a text string, but the other side of > is a numberThis is a text string, but the other side of > is a number |
Due / 2Due / 2 | A spreadsheet answers 23056 A date is a number of days since 1900. | fxEngine answers Expected a number but found a date or time insteadExpected a number but found a date or time instead |
-
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.