Union Types and Option Types
Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.
Copper, the "better C" language created by an unnamed developer, is shifting its type-system experimentation from general union types to a trimmed-down option type (T|Nothing) after union types proved too complex for a minimalistic low-level language. The earlier union implementation used a tag for the general T1|T2|...|Tn case but handled Pointer|Nothing without a tag, discriminating via the NULL pointer for speed and external-library integration. Restrictions included no nested unions, order-significant types (T1|T2 differs from T2|T1), and no compatibility between unions such as T1|T2 and T1|T2|T3, which simplified tag assignment but limited flexibility. The developer found the feature genuinely useful, mainly for T|Nothing and T|Error patterns, but concluded the compiler complexity outweighed the benefits; error handling will revert to returning an error plus a value. The new option type reserves a value to represent nil, with implementation details still emerging. What to watch: whether the narrower option type delivers the safety benefits without the compiler burden that sank full union types in Copper.
Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.
Named in this story
Copper