3 ms·
Back before I progressed beyond DOS batchfiles, I kind of just assumed that all the commands and keywords would be localized to whatever the local language was
by jordemort 6y ago
Back before I progressed beyond DOS batchfiles, I kind of just assumed that all the commands and keywords would be localized to whatever the local language was - I didn't think, for example, that Japanese-speaking users were out there typing "echo" and "dir" and "printf". I found it surprising and seemingly unjust when I learned that folks that spoke other languages generally had to learn a fair bit of English along whatever programming language they were learning. I can't imagine how much harder it must be to pick something up when the mnemonics are foreign gibberish to you. Of course now I realize that there's an element of practicality to it as well; J. Random Hacker can hardly be expected to translate the API they created into N different languages that they don't speak themselves. It also cuts both ways; GitHub Trending is increasingly full of projects that look like they're probably awesome and extremely useful and I have no idea what they even are because the documentation is entirely in Chinese.
I know some early versions of BASIC would save your source in a "tokenized" format, i.e. instead of literally storing "PRINT $FOO" they would store some bytecode that represented PRINT instead. One could possibly implement a polyglot programming language using a similar mechanism, and translate localized versions of keywords into (human) language-independent bytecodes. You'd have to pick one human language to be the canonical representation though, or have some sort of language declaration at the beginning of the file, or commit to having the canonical representation of your source code not be plain text - all of which seem suboptimal for different reasons. It also seems like it would be tough to extend that approach to code outside the standard library of the theoretical polyglot language.
- mywittyname 6y agoI really don't think this is as bad as people make it out to be. As you said, it's totally possible -- actually fairly straightforward -- to build a programming language with keywords that can be in various languages. Perl has a package that uses Latin constructs instead of English. So if there were a huge demand for this kind of thing, we'd probably see a lot of it. There are other professions which require the use of foreign terminology: lawyers use Latin, doctors use Greek & Latin, chefs use French. Sure, it makes things a little difficult at first, but it's probably not any more difficult than learning technical jargon in you native tongue. In fact, in some ways, it might be easier because the literal translation of "echo" might not actually make much sense to a Japanese speaker in the context of programming, whereas, with English you can teach a Japanese student that "echo" means to put characters on the screen. I remember reading about an effort Britain had to make the law more "accessible" by using English instead of Latin, and it just made things more difficult because instead of seeing words you had no idea the meaning of, now one knew what the statement said, but it would mean something completely different than they would expect.
- 908B64B197 6y ago> One could possibly implement a polyglot programming language using a similar mechanism, and translate localized versions of keywords into (human) language-independent bytecodes. I'm stretching it here, but assembly would tick all boxes here.
- TulliusCicero 6y agoThere are certain obvious advantages to using a single language. For example: I read r/IWantOut, as well as some CS career-related subs, and I myself am an American coder in Germany. Based on my own experience, as well as my reading and hearing from others, programming is probably the best overall career choice if you want the option of living in various different countries, in terms of how accessible it is as well as having decent pay. A big part of that accessibility is English, that you can find a significant number of jobs in many countries that don't require you to already know the local language.
- kalleboo 6y agoI recall that VBA in Office 4.2 or thereabouts supported localized versions of Visual Basic. Excel also supports localized formulas and cell references. HyperCard also supported localized versions of HyperTalk, but I think only a French sample localization was ever provided.