tc39 / tc39/proposal-amount

Prior Art

Open Beginner friendly
#43 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
58
Forks
12
Avg merge
2h 35m
Merged PRs (30d)
2

Description

The Stage 2 slides should include examples of prior art. I'll list some here. CC @eemeli @jessealama

Language Name and Docs Link Status Shape Unit/Currency Features
F# Units of Measure Core language feature In syntax, numeric types can be annotated with a Measure, such as 1.0<cm> Both Math, Conversion
Swift Measurement Standard Library (Foundation) Immutable struct associating number with statically-typed quantity Units Only* Math, Conversion
Java Quantity JSR 385, Standard Library Extension (javax) Class associating a number with a unit Units Only* Math, Conversion
JavaScript Unit Math.js, a popular package for working with numbers An object with fields unit (like "meter"), dimension (a bitmask encoding something like "length"), and an optional value Units Only Math, Conversion
C++ quantity Boost, a popular standard library extension package Class associating a unit with a value Units Only* Math, Conversion
C# IQuantity UnitsNet, a popular package for units Interface with many concrete impls associating number with quantity Units Only* Math, Conversion, I18n
Python Quantity Pint, a popular package for units Class associating number with units; runtime exceptions for incompatible conversions Both** Math, Conversion
Java Money Joda Money, a popular package for currency Class associating a BigDecimal with a currency Currency Only Math, Conversion***, I18n

* These libraries export public classes/interfaces/traits which could be used to implement arbitrary units or currencies.

** Units are dynamic runtime values and it appears that they can be anything.

*** Conversion requires the user to provide the conversion rate

The above list should be enough, but there are also popular packages with these types in Rust (uom), Ruby (ruby-units),

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Stage 2 slide source in the repository and use the prior-art table in this issue as the content reference. Add the listed examples and documentation links, then verify that the updated slides render correctly and include the relevant footnotes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp, fsharp, html, java, javascript, python, ruby, rust, swift
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.