3 ms·
From the OP: > (Incidentally, I think that representing all these different concepts as a single string type is a mistake. Human-readable text, file paths, SQL
by patsplat 11y ago
From the OP:
> (Incidentally, I think that representing all these different concepts as a single string type is a mistake. Human-readable text, file paths, SQL statements, and others are all conceptually different, and this should be represented as different types at the language level. I think that having different conceptual kinds of strings be distinct types would eliminate a lot of bugs. I'm not aware of any language or standard library that does this, though.)
There are many sub types which can be constructed from strings. Most languages treat at least following as special types that can be constructed from/to strings:
* numeric types (integer, float, etc)
* regular expressions
* file paths
* dates
* XML
* JSON
The real absence is SQL. It is shocking how such an apparently old standard has no stdlib parsing support.
Until one realizes there is no such thing as "Standard SQL". Any sufficiently visible "SQL Parser" project eventually will be buried in a sea of vendor-specific edge cases.