Representing Heterogeneous Data
journal.stuffwithstuff.com
journal.stuffwithstuff.com
More substantially, I was thinking of Typescript's control flow analysis as soon as I started reading through the "Record cases" section, I was already thinking of commenting on it, and then the next section anticipated my thoughts. I can definitely understand that being difficult to implement in the general case, but I'm curious if it'd be workable within the context of a single statement/expression. I'm envisioning something like Go's .(type) syntax. You'd probably need to restrict what would be allowed within each case branch, though, and that could get tricky and unintuitive to use.
In my experience these are all strings. Try storing a UK postcode as an int or a value like "1B" in an apartment number.