News for hackers. Stuff that matters.
Re:BigInt Shipping in Firefox by cpeterso on Thursday May 23, 2019 @01:48PM (#19994067)
BitInt's "n" suffix appears to stand for "numeric", but that seems confusing when typeof 1 === "number" and typeof 1n === "bigint". Why not an "i" suffix for "integer"? I understand that a "b" suffix is probably reserved in case JavaScript adds support for binary literals.

https://tc39.github.io/proposal-bigint/#prod-BigIntLiteralSu...

Re:BigInt Shipping in Firefox by ash_gti on Thursday May 23, 2019 @03:40PM (#19995197)
'i' suffix are often used in languages for complex numbers. For example, in ruby '1i' evaluates to 0+1i as a complex number.

I suspect they didn't want to conflate the two types.

Re:BigInt Shipping in Firefox by loeg on Thursday May 23, 2019 @02:13PM (#19994338)
1i is a bit more difficult to read than 1n in many fonts. I don't think any numeral is plausibly confused with n, so 'iNt' makes some sense as a suffix IMO.
Re:BigInt Shipping in Firefox by GordonS on Thursday May 23, 2019 @06:02PM (#19996468)
As an aside, c# uses "L" to denote literals as 64-bit integers. "l" works too, but "L" is encouraged for the same reason you give ("l" could be confused as "1")
Re:BigInt Shipping in Firefox by GordonS on Thursday May 23, 2019 @06:06PM (#19996502)
64-bit integers are referred to as 'long' in languages I'm more familiar with, so personally I would have expected an "L" suffix. 32-bit integers are referred to as 'integers' in many languages, so I wouldn't expect an 'i' suffix. In any case, I certainly agree that "n" is confusing since Javascript already has a numeric type.
Re:BigInt Shipping in Firefox by matthewbauer on Thursday May 23, 2019 @02:27PM (#19994476)
Maybe to avoid confusion with mathematical imaginary notation.
Re:BigInt Shipping in Firefox by vanderZwan on Thursday May 23, 2019 @06:46PM (#19996779)
I suspect it is more that in mathematics, n is used to indicate integer values as opposed to for example x, which is used with real values.
Re:BigInt Shipping in Firefox by SomeOldThrow on Thursday May 23, 2019 @09:42PM (#19997762)
> BitInt's "n" suffix appears to stand for "numeric"

It actually stands for "not numeric"