An integer that remembers the base it is written in.
The fourth sibling of _Number, after _Complex, _Truth and _Rational, and built to the same pattern: a private constructor behind a smart factory, and a value that is read as a number through _Number's widening extractor so no existing case _Number(x) site has to learn about it.
Why the base lives on the value. A base conversion that returns bare digits is only a decomposition: [[15, 15]] is indistinguishable from a matrix typed by hand, and the caller has to remember the base to reassemble it. Putting the base on the value is what makes A := 0xFF still beFF when it is printed an hour later.
The tag is shallow, deliberately.0xFF + 1 prints 256 in decimal, because Sum.eval reads both operands as numbers and builds a plain _Number. Carrying the base through arithmetic would require deciding whose base wins in 0xFF + 0b1011, and there is no defensible answer — so the base survives display and storage, which is what a base is for, and arithmetic falls back to decimal.
Value parameters
balanced
whether the digits are the balanced set (base 3 only)
base
the radix, 2 .. 36
value
the integer value, held as a Double like every other numeric tier
The literal form, which re-parses to this same value — the round-trip invariant.
The literal form, which re-parses to this same value — the round-trip invariant.
Bases 2, 8 and 16 and balanced ternary have prefix literals; any other base has none, so it prints as the tobase(n, b) call that produces it. Both re-parse.