Nitpick Literal Formats

Nitpick enforces strict typing rules around literal values. Because implicit type inference can lead to subtle stateful compilation bugs (e.g., is 1 an int32, int64, or uint32?), Nitpick generally requires numeric literals to carry their explicit type as a suffix.

1. Type Inference & Suffix Omission

While suffixes are required, the compiler provides one strict affordance for ergonomics: You may omit the literal suffix IF AND ONLY IF the value natively fits within the explicitly declared target type.

// Valid: 10 fits easily within the [-128, 127] bounds of int8
int8:small_val = 10;

// ERROR: 256 is out of bounds for int8.
// The compiler rejects this. To force it (and trigger a rollover/error),
// you would need explicit casts and suffixes: int8:bad_val = 256i16 => int8;
int8:bad_val = 256; 

2. Numeric Base Suffixes

Nitpick abandons traditional C-style prefixes (0x, 0b) in favor of uniform Base Suffixes, adhering to the language’s “things do not change based on context” rule (suffixes at the end, not prefixes at the beginning).

Note: Legacy C-style prefixes (0x, 0b, 0o, 0n) are retained solely for C FFI compatibility but are discouraged in native Nitpick code.

3. Numeric Suffixes

When a suffix is required (or provided pedantically), it is appended directly to the number without spaces.

4. Large Integers (LBIM) & Scientific Notation

Nitpick supports exceptionally large cryptographic integers (int2048, int4096). To prevent source files from exploding with thousands of digits, these types do not support direct source-code literals.

Instead, they are instantiated at compile/run time by parsing standard scientific notation strings.

// Creates a 2048-bit unsigned integer using scientific notation parsing
uint2048:crypto_key = parse_uint2048("1.5e308");

// Negative parsing for signed large integers
int4096:massive_neg = parse_int4096("-3.7e500");

5. Strings & Template Literals

Nitpick strings are first-class data citizens.