On 13 December 2017 at 02:26, J Decker <[email protected]> wrote: > > My concern would be the non-symmetry/irreversability of this.... (can't > get out what you put in) > Factorio uses such suffixes in their mods but that's a total one-off. > I've not seen real standards anywhere for this sort of thing in any > language generally. >
F# includes a system of user-definable units of measure, based on Andrew Kennedy's pioneering work. The type system checks that they are used consistently and it can infer that e.g. acceleration (m/s^2) multiplied by time (s) yields velocity (m/s). However, the main benefit of all this is the type checking, so I doubt there is much value for JavaScript. If you just want dynamic checking you can build respective classes yourself.
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

