4 ms·
Giving types names is sometimes useful, yes. To the extent that languages often have that as the only thing and maybe have somewhat second class anonymous types
by JonChesterfield 2y ago
Giving types names is sometimes useful, yes. To the extent that languages often have that as the only thing and maybe have somewhat second class anonymous types without names.
It's called "nominal typing", because the types have names. I don't know why it's called "branded" instead here. There's probably a reason for the [syntax choice].
Old idea but a good one.
- LelouBil 2y agoIt's called branded because the article is talking about branded types a way to enable nominal typing inside the structural typing system of Typescript. Saying "nominal type" wouldn't mean anything.