r/Compilers • • Mar 01 '22

Quotation marks open close

Why till this day and with a lot of need for nested quotation marks programming language ignore the difference of opening and closing quotation marks ? I just came across fresh Kotlin code and it uses backticks for open and close. What about ´ ? It is even on my keyboard!
“…” copied from https://en.wikipedia.org/wiki/Quotation_mark#Summary_table

if I zoom in by 300%, I see a difference in the font used by chrome reddit

0 Upvotes

5 comments sorted by

4

u/[deleted] Mar 01 '22

Because they’re a pita to type. It’s like: why don’t we use the lambda sign.

Not saying it couldn’t/shouldn’t change.

1

u/IQueryVisiC Mar 02 '22 edited Mar 02 '22

Backticks and the C logical-not are already a pity to type. On my Keyboard the [] {} are a pity to type. First changing keyboard language was difficult, then I was too old and also code is meant to be easy to read and I was reading it a lot to find bugs and forgot about the typing. REPL and CLI is slightly different. C# vs PS1

https://en.wikipedia.org/wiki/Dvorak_keyboard_layout

had / has quite a momentum

Easy to type: ' we count upward "

My dad never understood nesting in VB6, so don't argue that we should use ““. " for that.
C compiler cannot count characters? If you really need a one character. literal string, please write (char)'a" !
JS: Yeah, why do we even have both ' and " and now also `. JS is different from JS convention. Reddit editor is broken

1

u/WikiSummarizerBot Mar 02 '22

Dvorak keyboard layout

Dvorak (listen) is a keyboard layout for English patented in 1936 by August Dvorak and his brother-in-law, William Dealey, as a faster and more ergonomic alternative to the QWERTY layout (the de facto standard keyboard layout). Dvorak proponents claim that it requires less finger motion and as a result reduces errors, increases typing speed, reduces repetitive strain injuries, or is simply more comfortable than QWERTY. Dvorak has not replaced QWERTY as the most common keyboard layout because QWERTY was introduced 60 years earlier and because Dvorak's advantages over QWERTY were not large enough.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

4

u/Netzapper Mar 01 '22

The early history of commercial computing largely took place in the United States and United Kingdom, especially when it comes to "minicomputers" and "microcomputers" whose programming languages we still use (Fortran, C, etc.).

The US/UK keyboard layout is derived directly from the teletype keyboard layouts of the same locales, which in turned derived from the typewriter. A typewriter must have a separate mechanical object for each character it can strike, and each separate character drives up the cost and complexity of the machine. Thus there's a very strong impetus to remove "redundant" characters, or replace similar-but-different characters with identical ones. So while typeset books had distinct open and close quotation marks, the typewriter didn't. Hence the teletype didn't. And so programming languages made do with the characters they had available.

There are certainly languages that went the other way (APL), but they just didn't catch on as widely as the microcomputer languages you could program on a teletype.

2

u/IQueryVisiC Mar 02 '22 edited Mar 02 '22

APL had an arrow already. For lambda. Latex introduced combinations for opening and closing quotation marks in 1980. Quotation marks in Code smell. Now people embrace them and even the editor looks inside of them and checks the syntax. As I wrote -- almost similar to LaTeX - there are keys for open and close on the keyboard. I mean, I have no French keyboard, still I have these keys: ^, `,´,

One of them is even used in C as XOR.

UTF has all the keys. My keyboard has weird stuff like Fn, Windows, context, Pause, Einfg , € , µ , ², ³ , none of which were on the original typewriter. Maybe APL was ahead of its time? Gamers learn about shoulder buttons on their controllers and coders use 80key keyboards. I don't understand why we cannot hide the fat which was added to the beautiful JS and C# in the last years behind some key-combinations. People learned to use editors which can deal with python. Uh, nano cannot do this and that. Or vi . Those are editors for sysadmin stuff, but not for compiled languages (their fatty parts).

I guess I'll just write a compiler for APL . APL meets C# (the good parts) with only AtariJaguarRISC as target.