Numeric Separators: Readable Big Numbers

Mrs. Tini’s till code with _ in its numbers: when does the engine accept the underscores, when does it refuse, what about a leading _15000, and what becomes…

Why it matters

Big numbers are everywhere: prices, timeouts in milliseconds (60_000), bitmasks (0b1010_0001), colours (0xFF_88_00). One missed zero can be a bug. Separators make a number in code read the way you think it, at no cost while it runs. But they are only for code: text people type does not follow the rule.

The key idea

The underscore is only for code, not for the value or for text

Common mistakes

Try it in this playground