Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll never understand why JS decided to use backticks. It's so weird to type on German keyboard.


It’s fundamentally a Unixism, like the tilde and some other characters used in C family languages that don’t exist on many European keyboards.

If you look back 30-50 years, most of the popular programming languages like Pascal and BASIC used a very limited character set. Instead of symbols like various brackets and tilde and backtick, they used keywords. This was intentional because they were designed to be possible to type on various Latin keyboards.

But Unix and C were developed by American hackers who had no reason not to use all the ASCII characters available on the Teletype-whatever connected to the PDP-whatever. And that’s the path we ended up on.

In the 1980s the C standard committee tried to address this problem by adding support for trigraphs. There’s a whole set of three-character symbols (identified by a prefix of two question marks) that can be used in C code in place of curly brackets and all the rest of the exotic ASCII set. But I’ve never seen anyone use this, and I think trigraphs are scheduled for removal in C.


It's the closest thing to a quote without being a quote. Enabling interpolation for old syntax would break old websites that display strings that aren't intended to be interpolated.

If you're curious enough, I'm sure you can find the TC39 proposal.


I'm from the EU, but once I switched to US-keyboard layouts everywhere, so many programming languages' syntactical choices suddenly made sense.


Isn't it on the right side of question mark? On my nordic keyboard it is and you just need to press shift and backtick key. I don't see how it's too difficult.


Yes. But to me it feels far away compared to the quotes. And depending on the editor, it may end up above a letter if you forget to press space. For example "à". It can be a bit annoying.


Try the Neo layout, optimized for writing german, english and programing. It places the most used letters and symbols under your strongest fingers. Absolutely worth the effort, QWERTX is a pain in comparison.

https://neo-layout.org/


With your reasoning we wouldn't be able to use any special characters considering every character has layouts where it's awkward to type.


Backticks are used for certain letters in several European languages. à, ì, ù, ò. Depending on the editor, it's kinda annoying. Normal quotes or double quotes usually don't do that. Also, the key is right beside the backspace key, which feels kinda far away for my hands (which of course also depends on the keyboard).


> Normal quotes or double quotes usually don't do that

With backticks we don't need to worry about quotes in the content inside being interpreted as the end of a string in JS


Switch to the US layout for programming then. It's impossible to cater to all the languages in the world.




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

Search: