News for hackers. Stuff that matters.
Re:The type system is a programmer's best friend by yafbum on Saturday November 05, 2022 @09:29AM (#33481270)
This problem has already been solved. Use something like https://en.m.wikipedia.org/wiki/ISO_3166-1_alpha-2 and get an authoritative list of countries / territories, including defunct ones like Yugoslavia and USSR. You still have to define the business logic of whether you want to keep a certain country record aligned with historical borders or with current borders, but that problem exists whether you have primitive type to represent countries or not...

There are no comments on this comment yet.