(One) namespace? #7
Replies: 3 comments 11 replies
-
I'm not sure about Conceptually, I think ... Actually, thinking a bit more, what I stated above simply implies that Though probably it is good if |
Beta Was this translation helpful? Give feedback.
-
EDIT: moved to thread https://github.com/orgs/quantity-dev/discussions/7#discussioncomment-12217973 |
Beta Was this translation helpful? Give feedback.
-
Cross-posting: What about |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
An idea that we seem to be converging on is that we don't just want to standardise the
Quantity
,Unit
, andDimension
classes—rather, we would also like to standardise some sort ofQuantityNamespace
which could contain things like:asquantity
to construct aQuantity
asunit
to construct aUnit
asdimension
to construct aDimension
The primary motivation for this so far seems to be that we can circumvent constraining class instantiation by using constructor functions instead. But there is the more general point that favouring namespace functions over object methods (like the array API standard has done) makes adoption easier.
My primary question here: does it seem like we could have just one namespace for all of these things?
ping @nstarman @mhvk @neutrinoceros @andrewgsavage @SimonHeybrock
Beta Was this translation helpful? Give feedback.
All reactions