5 ms·
> But no matter what format any bit of data is in, it should still be documented. That's what types are: enforced documentation.
by wtbob 11y ago
> But no matter what format any bit of data is in, it should still be documented.
That's what types are: enforced documentation.
- dec0dedab0de 11y agoThat's what types are: enforced documentation. That's an interesting way to think about it, but I'm not sure it applies here. From the example given about money being a string or a float. A type would just enforce either or, but the consumer of the data would still need to know what it is, and convert it to whatever is necessary for them.