4 ms·
> Programming uses the same words as regular English Let us be clear that this is US English and not British, but I agree with your sentiment: that the keyword
by cmroanirgo 7y ago
> Programming uses the same words as regular English
Let us be clear that this is US English and not British, but I agree with your sentiment: that the keywords are more a linguistic jargon than anything.
Although the main topic here is about other languages, there are also nuances within the two main streams of English that it's also a little wierd sometimes.
For me, I spell color with a U: ie. colour, but when coding, it's always been the US variant. I've typed this word so much that when I need to type it in my variant, that colour just looks wrong, even though it's the correct spelling in (my area).
Occasionally, when skimming British code, I've come across colour variables and it looks wrong. Similarly, I've looked at French code and there are similar strange things that leak out. The same for Russian and Japanese code I've encountered, eg:
> function <insert_diacritic_or_kanji_here>(char p)...*
The purist in me really wants to state: "everyone should type US English", but the more accepting part of me concedes that maybe keywords should be internationalised (/internationalized) too. Maybe a preprocessor system would suffice (eg somecode.c.jp -> somecode.c), but as you state: it doesn't seem right because of the 'jargon' nature of it.
The good news is that machine code and punch cards have no language, so maybe we could revert to using that and then we can neatly skip over this issue entirely ;-)
- satori99 7y ago> The good news is that machine code and punch cards have no language Aren't most instruction names are English abbreviations? Maybe we can internationalize those too. Just to be consistent of course.
- cmroanirgo 7y ago> Aren't most instruction names are English abbreviations? I think you're thinking of boring old assembly...? eg (a move instruction): > MOV EAX,15 Yes you're right about the abbreviated english, but that's why I didn't suggest it as an i18n solution.
- satori99 7y agoyeah, indeed i was
- Kalium 7y agoI think what this question exposes is that the primary consumers of code are humans. Code is only incidentally written for computers. So really, this is exactly the same problem human language exists to solve. There's no getting away from it.