3 ms·
The backtick is just a problematic character. Python 3 had good reasons to drop it, so I'm surprised when anyone else starts to use it. Among the reasons Pytho
by kzrdude 9y ago
The backtick is just a problematic character. Python 3 had good reasons to drop it, so I'm surprised when anyone else starts to use it.
Among the reasons Python devs cited were that it was hard to get printed correctly in books, and hard for users to write in general, depending on keyboard layout.
- zmmmmm 9y agoWhile those sound like valid concerns, it's been adopted by Javascript / ES6 already and for me the benefit of consistency outweighs them.
- zeroimpl 9y agoWhile this syntax looks decent to me, I'm curious why they didn't go with a heredoc approach, e.g.: String s = <<<TEXT <html> <body> contents </body> </html> TEXT
- jug 9y agoYup, using a grave accent as a symbol in this time and age of Unicode is just clueless. It's a symbol usually used as a diacritical mark for letters, like è. It's thus often a "dead key" (a key that awaits the next one because it is expected to be used combined with another), just not on US keyboards. How hard is it to at least consider the general set of Western keyboards before deciding upon these things? Hint: Let programming languages use characters 1) in the ASCII character set and 2) not diacritical marks, and you'll be fine... It's honestly not rocket science. I think it's a programming language designer's responsibility to just know these things in 2018. In the competing .NET Framework, @ is used for raw string literals, as in @"raw string". The diacritical marks ~ and ^ do occur there for bitwise logical operations and ~ in declarations of destructors but I don't think this is optimal. I never really understood why they inherited C++'s destructor syntax to have a semi-obnoxious special symbol just for this particular one case that is used at most once per entire class definition, that is shared with bitwise complement (???), no less... Is it so bad with keywords? Or why not just use "!" as in "not". It would at least make more sense.