4 ms·
Backticks are used as literals in a lot of contexts, especially DBs. Overloading that behavior by default would likely blow up a lot of code and certainly viol
by 60secs 3y ago
Backticks are used as literals in a lot of contexts, especially DBs.
Overloading that behavior by default would likely blow up a lot of code and certainly violate the principle of least surprise.
- paulddraper 3y agoBy DBs, you mean MySQL :/ No one else has such an oddity
- coldtea 3y agoSQLite also features backticks as literals (though they're not the main option). And I fail to see how it's much of an oddity, as other RDBs use all kinds of BS for literals. SQL Server for example uses [square brackets]. If anything backticks have some history of being used for string literals in some languages (e.g. Javascript and Go), whereas in many others they are used for command substitution (which is not far removed from what a string literal combined with a processor does in Java).
- paulddraper 3y agoI consider them to be odd when ANSI SQL has perfectly workable identifier quoting. Different for the purpose of being different.
- scrame 3y agoyes and mysql has an enormous install base.