6 ms·
Hmm, what if standard libraries were available in multiple natural languages? You could always serialise the code as English, if you needed to interop with a mu
by evincarofautumn 12y ago
Hmm, what if standard libraries were available in multiple natural languages? You could always serialise the code as English, if you needed to interop with a multilingual team and that happened to be a good common language, but at display time, the identifiers can look however you want according to your locale and the available translations in the library.
Of course, if you hypothesise that API design could be influenced by natural language, then you might worry about things getting lost in translation. But APIs that use English words aren’t much like natural English already.
- TylerE 12y agoThat will fail when you have words in different langauges that mean different things.
- evincarofautumn 12y agoYou only speak English, though, right?
- PeterisP 12y agoThere is no requirement that the code you see/edit is the same code that is stored and compiled. Just as an editor can show → for -> and λ for \ if adequately configured, it can also show 'если' for 'if' and 'Функция' for 'function' (or, say, the chinese equivalents) while keeping the underlying code in english. It wouldn't even need any cooperation from language implementations or library developers, and it'd be compatible with all legacy code! I'm not saying that it's a good idea, though, just a possibility.
- ygra 12y agoExcel does this for formulae (and in very old versions even for VBA).
- evincarofautumn 12y agoI was thinking of translating actual APIs, not just keywords. Machine translation may not do so well with that.