Skip to content

Nominal Typing

Spicy — senior dev territoryGeneral Dev

ELI5 — The Vibe Check

Nominal typing is the VIP list at a club — even if you look exactly like someone on the list, you can't get in unless your name matches. Java and C# use this: two identical classes with different names are completely different types.

Real Talk

A type system where compatibility is determined by explicit type names and declarations, not structure. Two types with identical properties are incompatible if they have different names. Languages like Java, C#, and Swift use nominal typing. TypeScript simulates it via branded types.

When You'll Hear This

"Java uses nominal typing — you must explicitly implement an interface, even if you already have all the methods." / "We simulate nominal types in TypeScript with branded types when structural typing is too loose."

Made with passive-aggressive love by manoga.digital. Powered by Claude.