squiggle icon indicating copy to clipboard operation
squiggle copied to clipboard

Unify unit types with other types

Open berekuk opened this issue 11 months ago • 0 comments

I expect that we will deprecate or remove the syntax for unit types implemented in #3323.

Instead, we should have something like this:

kg = Number.unit("kg") // type object
m = Number.unit("m")
x: List(kg/m) = [1,2,3]

Doing this will allow us to:

  • remove the separate :: unit type system
  • have lists of unit-aware numbers or distributions of unit-aware values
  • store unit types in variables, import them from other modules, etc.

This issue is an early draft, just to file this is some form. It's probably an epic, with multiple sub-tasks that need to be described, and possibly could be done separately and in arbitrary order (e.g. we can implement unit type constructors separately from generic lists over units).

berekuk avatar Jan 16 '25 18:01 berekuk