Hacker News new | past | comments | ask | show | jobs | submit login

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.




By DBs, you mean MySQL :/

No one else has such an oddity


SQLite 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).


I consider them to be odd when ANSI SQL has perfectly workable identifier quoting.

Different for the purpose of being different.


yes and mysql has an enormous install base.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: