The Zigma Philosophy
Zigma is built on the belief that computers should understand physics as well as humans do.
In a typical scientific script, a number like 9.81 is "naked"—it has no inherent meaning.
Zigma gives that number metadata by attaching a physical dimension to it.
The "Never Assume" Rule
In Zigma, dimensions are absolute, but scales are fluid.
a = 10 m
b = 100 mm
c = a + b
In the example above, Zigma knows with 100% certainty that c is a Length. However, Zigma’s philosophy is that you, the programmer, should never assume the current scale of a variable unless you explicitly set it.
Why?
To prevent data loss, Zigma always defaults to the smallest (most precise) scale involved in an operation. In the example above, c will result in mm because it is the more precise unit. If Zigma chose meters, it might have to truncate data if you were using integers.
The Rule of Thumb:
Care about scales only when you export or output data.
During the "middle" of your calculation, let Zigma manage the scales.
When it is time to print a result to the console or save it to a CSV, use the in keyword to be explicit.
// Explicitly define your "boundary" scale
print "{c in m}"
Safety vs. Flexibility
Zigma is designed to be strict on physics but flexible on math.
- Strict Physics: You can never add Mass to Time. There is no "cast" that can bypass this. This is a hard law of the language designed to prevent the loss of spacecraft or the failure of engineering models.
- Flexible Math: Zigma allows you to mix types (integers and floats) and scales (meters and inches) freely. The compiler handles the messy conversion work so you can focus on the equations.