3 ms·
I think it's a design choice. Ignoring types lets you focus on other features, in case of SQLite, things like crash resistance and reliability. In other words,
by js8 7y ago
I think it's a design choice. Ignoring types lets you focus on other features, in case of SQLite, things like crash resistance and reliability.
In other words, typechecking is also a cost for language designer.
Even SQL itself has not particularly strong type system. Perhaps you're looking for something else entirely.
- justinclift 7y agoInterestingly, it's amazing to me that many SQLite libraries in the Go ecosystem don't support these mixed/flexible data types in tables. If you read back a set of values and one of the fields in a row doesn't match the data type given by the column, the libraries will error out. One library that works correctly is github.com/gwenn/gosqlite, which checks the data type of each field of the result set (per row), so handles things gracefully.
- suyjuris 7y agoSQLite originated as a TCL extension, so it would make sense for it to share TCL's (notoriously lax) philosophy regarding types.