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

C also has trigraphs, in case your keyboard does not have a \ you can type ??/ instead.

https://en.wikibooks.org/wiki/C_Programming/C_trigraph




Mind blown. C is truly a terrifying language and I can’t help but love it for that.


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


I 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.


Apparently there are several digraphs too. Convinced this was secretly just designed to make IOCCC contests more interesting.


I wonder how many regex security filters would break using ??/ for escape because very few people know this exists.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: