3 ms·
In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention,
by lifthrasiir 6y ago
In addition to its use as a path separator in DOS and Windows, the backslash character itself is also interesting because it is very likely a modern invention, with the first attestation in 1940s (!). Its original use in ASCII (1960s) was for ALGOL operator digraphs `\/` and `/\`. Its early use as the C escape sequence (1970s, replacing `*` in BCPL) suggests that it carried no significant semantics at that time.
- 4cao 6y agoOne of the comments on that blog post says the backslash was invented by Bob Bemer at the time he developed ASCII in the 1960s, also linking to a page that supports the claim: https://web.archive.org/web/20100612011533/http://thocp.net/biographies/bemer_bob.htm https://web.archive.org/web/20100612011533/http://thocp.net/...
- lifthrasiir 6y agoI briefly checked comments and missed that. ;-) I would be more cautious to say that he invented backslashes, as it's unknown that he was aware of earlier uses of backslashes. (I've checked both the page and its citations and they gave no more information.)
- 4cao 6y ago> I would be more cautious to say that he invented backslashes You're right of course, I was just relaying what the post there said. There was prior usage as early as in the 1940s as you mentioned. According to Wikipedia, [1] its origins are unknown: > As of January 2021, Wikipedia editors have not been able to find the origin of this character nor even the purposes to which it was put before the 1960s. The earliest known reference found to date is a 1945 bulletin from the Teletype Corporation that lists it as a replaceable part for its Wheatstone perforator. On the other hand, I think it's safe to say it would have remained an obscure character had it not been for Bob Bemer. 1. https://en.wikipedia.org/wiki/Backslash#History https://en.wikipedia.org/wiki/Backslash#History
- Taniwha 6y agoWhile it was included in early character sets it just wasn't used much - largely because the ubiquitous 029 card punch had no \ key (or [] ... one had to learn the multipunches)
- 0x0 6y agoC also has trigraphs, in case your keyboard does not have a \ you can type ??/ instead. https://en.wikibooks.org/wiki/C_Programming/C_trigraph https://en.wikibooks.org/wiki/C_Programming/C_trigraph
- IgorPartola 6y agoMind blown. C is truly a terrifying language and I can’t help but love it for that.
- zinekeller 6y agoIt was designed in a time where keyboards around the world (German QWERTZ, Cyrillic JCKUEN/ЙЦУКЕН) and text encoding (remember that this is pre-Unicode, so we're dealing with ISO 646 and Eastern Asian character sets) has only the subset of Latin characters used in the US. Nowadays, it is strongly recommended to simply use the standard American keyboard in programming (outside of comments).
- samus 6y agoI still cannot decide whether it's better to comment in English or in my native language. English works, but it's a weird fit with words from the application domain. Those, I don't really want to translate, but I have to keep doing it because there is so much legacy code with the translations. Sure, I could do a rampage through the code base and fix everything up (would be done in an afternoon thanks to IntelliJ), but my team would almost certainly give me lots of flak for this. At the same time, it also feels weird to conjugate english words in my native language.
- mycall 6y agoI wonder how many regex security filters would break using ??/ for escape because very few people know this exists.
- dada78641 6y agoApparently there are several digraphs too. Convinced this was secretly just designed to make IOCCC contests more interesting.
- jimmaswell 6y agoI feel like some people must have written slashes in whatever direction long before, but it was never formalized until then.