On 2014/05/06 06:47, Scott Robison wrote:
Except it doesn't, because C compilers can warn when you type "if (var = constant) ...;" when you probably meant "if (var == constant) ...;". If at least some C compiler implementations can do that within the confines of the ANSI C 89 standard, SQLite certainly *could* do something similar. Even without a boolean type.
Firstly, I'm in agreement to a high extent with most of your observations, and I too thought the OP's complaint wasn't invalid, just insufficient to prompt change, but just a small pedanticism aside due the piece above:
YES - C warns you of an assignment where you possibly meant to compare, but C has a compiler that warns you, and you have the luxury to ignore it - i.e. if your intent is to use/abuse the situation you can safely ignore the compiler warning and the compiled code will run as you intended without ever again stopping/warning/anything. This is very different to the SQL engine which doesn't compile your code per se... it either returns results, or it doesn't - do you really wish for it to return an error (because how else would a warning ever be communicated?) than just trying to accommodate what the request might be trying to achieve?
It isn't the same ballgame. That said, I agree SQLite *could* be more strict, but I doubt the value and have to agree with Mr. Kreibich in that no returned result is/was unexpected - adapting SQLite to point out wrongful operator assumptions or typos has no benefit to the engine's use - I mean what's next, suggesting a better way to write a query when it disagrees with how you structured your query? :)
_______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

