Will contain the of infix operator which takes any object as its left operand and a unit as its right operand. No conversions or copies are ever performed; a unit is an adaptor based on the original type, and the of operator simply performs the cast after doing some other checks and logic.
Most common units should be supported.
For example, ((123 of seconds) of minutes) of seconds is an expression which adapts 123 as seconds 1-to-1, then adapts that value to a version of minutes that converts to/from seconds, and then adapts that value to a version of seconds that converts to/from minutes. It is also quite inefficient without optimizations.
Will contain the
of
infix operator which takes any object as its left operand and a unit as its right operand. No conversions or copies are ever performed; a unit is an adaptor based on the original type, and theof
operator simply performs the cast after doing some other checks and logic.Most common units should be supported.
For example,
((123 of seconds) of minutes) of seconds
is an expression which adapts123
asseconds
1-to-1, then adapts that value to a version ofminutes
that converts to/fromseconds
, and then adapts that value to a version ofseconds
that converts to/fromminutes
. It is also quite inefficient without optimizations.