ianmackenzie / elm-units

Simple, safe and convenient unit types and conversions for Elm
https://package.elm-lang.org/packages/ianmackenzie/elm-units/latest/
BSD 3-Clause "New" or "Revised" License
85 stars 14 forks source link

Rename 'Quantity' -> 'Qty'? #1

Closed ianmackenzie closed 6 years ago

ianmackenzie commented 6 years ago

More succinct, especially noticeable in cases like unwrapping/re-wrapping and using infix operators:

foo (Qty a) (Qty b) (Qty c) =
   Qty (a + b * c)

rate =
    x |> Qty.plus y |> Qty.per z

Slightly more cryptic, but 'Qty' is a pretty common short form of 'Quantity'.

ianmackenzie commented 6 years ago

Tried it briefly, seemed messy - closing this for now, might revisit it later.