Skip to content

Quantity: constructing quantities #7

@lucascolley

Description

@lucascolley

How must we be able to construct a Quantity?

  • Must Quantity(value, unit) return Q such that Q.value is value, and Q.unit is unit? If so, can we type that without enforcing certain signatures or parameter names which may be difficult for existing libraries to adopt?
  • If not, do we instead want to standardise a QuantityNamespace, of which the Quantity class is a member, but which also has a creation function such as QuantityNamespace.asquantity? Would all existing libraries be happy with exposing such a namespace?
  • Or do we instead leave creation to the unit API, via something like value << unit?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions