tersesystems/blindsight

Add units for numeric/time arguments

wsargent opened this issue · 1 comments

Dealing with times, dates and durations is tough because JSON doesn't have a representation of these concepts, and it's easy for unit information to be lost in transit.

Dealing with scalar information like distance, speed, weight, etc is also a problem because there's no unit schema. You can represent an Instant as a string or as milliseconds since epoch since you know it's an Instant, but you don't know what to do with a raw Int or a String.

It might be nice to add unit support to Blindsight through Coulomb and refined, and then have formatters that can be applied to units depending on the encoding, so you are always dealing with Mass or Speed etc.

https://github.com/erikerlandson/coulomb#documentation

Like the logging-schema generation, this seems like it should be a different project.