3 ms·
For analytics, I am a fan of type minimalism, like in SAS. You only really need to distinguish numbers and strings (each with missing value), and table as an ov
by js8 2y ago
For analytics, I am a fan of type minimalism, like in SAS. You only really need to distinguish numbers and strings (each with missing value), and table as an overarching structure. They do everything else with input and output "formats". Perhaps you want to throw in enumerations (and sets of thereof) for a good measure.
That being said, typing is hard. There are many ways to consider what is a type, and I don't see a clear physical/logical distinction. Whether type should determine storage method is one thing. Another consideration is whether type is intrinsic to the value (e.g. string in UTF-8, float64, etc.) or is extrinsic (e.g. length, weight, area and so on). This is somewhat based on whether the type is implied by the operations used on the value (for example, you can subtract numbers but not strings).
Edit: Also, if you're gonna treat time as a separate type, why not also have 2D and 3D coordinates as its own type? It's just hard to make an ultimate standard.