Skip to content

BigInt shouldn't be considered experimental#28456

Merged
DanielRosenwasser merged 8 commits intomasterfrom
nonExperimentalBigInt
Nov 12, 2018
Merged

BigInt shouldn't be considered experimental#28456
DanielRosenwasser merged 8 commits intomasterfrom
nonExperimentalBigInt

Conversation

@DanielRosenwasser
Copy link
Copy Markdown
Member

I know that in #25886 we discussed that we should gate the functionality behind a flag, but we have a degree of confidence that the BigInt proposal is relatively stable.

  • Chrome ships it in stable releases.
  • Node 11 ships with it now too

Additionally, we haven't hidden features like object rest/spread behind a flag, even when that feature had no browser implementations, so it's not clear why we need it here.

@DanielRosenwasser
Copy link
Copy Markdown
Member Author

CC @bterlson @RyanCavanaugh @calebsander for thoughts

@calebsander
Copy link
Copy Markdown
Contributor

I would agree that BigInt is not really "experimental"—V8 acts as a well-defined reference implementation. I would add that BigInt literals and libs were available in Node 10 (which has been out for 6 months), not just Node 11. Forcing the user to target esnext seems like enough of a barrier to check that they really want to use features without universal support. Thanks for fixing my spelling mistake too 😄

@sheetalkamat
Copy link
Copy Markdown
Member

ok. You need to update baselines and also remove experimentalBigInt from bunch of test cases

let bigintNegativeLiteralType: -123n; // should not error when used as type
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error No newline at end of file
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you added 2 newlines here, but probably only meant to add 1

var bigintType; // should not error
var bigintLiteralType; // should not error when used as type
var bigintNegativeLiteralType; // should not error when used as type
var bigintNumber = 123n * 15n + 292n * 0x7fn; // each literal should error
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these warnExperimentalBigIntLiteral.* baselines be removed?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed warnExperimentalBigIntLiteral.errors.txt but not the .js, the .symbols, and the .types files

@DanielRosenwasser DanielRosenwasser merged commit 25462be into master Nov 12, 2018
@DanielRosenwasser DanielRosenwasser deleted the nonExperimentalBigInt branch November 12, 2018 23:59
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants