Skip to content

Commit

Permalink
explainer: Alternative variadic ƒ design
Browse files Browse the repository at this point in the history
See #3.
  • Loading branch information
js-choi authored Aug 31, 2021
1 parent c833db7 commit bf48b1a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ due to their variadic parameters:
for example, `Math.hypot(arrayOfBigInts)` returning the Number `+0` instead of `0n`
whenever `arrayOfBigInts` happens to be empty.)

<details>
<summary>Alternative solution for BigInt `hypot`, `max`, and `min`</summary>

Alternatively, instead of adding `Math.bigHypot`, `Math.bigMax`, and `Math.min`,
we could the add `hypot`, `max`, and `min` methods to `BigInt` (and to `Number` too).
See [issue #3](https://github.com/js-choi/proposal-bigint-math/issues/3).

</details>

Existing `Math` functions that would not make sense with BigInts
are excluded from this proposal. These include:

Expand Down

0 comments on commit bf48b1a

Please sign in to comment.