tc39 / tc39/proposal-amount

Consider adding 's' and 'n' to serialized form for String and BigInt

Open
#147 4 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

Without looking at the larger string serialization problem (https://github.com/tc39/proposal-amount/issues/116), I wanted to discuss whether the string form should differentiate between String, Number, and BigInt (and arrays thereof). Maybe BigInt could use n instead of e+0.

For example, currently we have: [1e0 ~]

How about:

  • [1e0 ~] = new Amount(1e0, null)
  • [1n ~] = new Amount(1n, null)
  • [1e0s ~] = new Amount("1e0", null)

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

Start with the examples in this issue and the linked larger string serialization problem. Determine whether distinct forms for String, Number, and BigInt, including arrays thereof, are accepted; done requires a documented decision on the proposed s and n forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.