Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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


Excel does this for formulae (and in very old versions even for VBA).


I was thinking of translating actual APIs, not just keywords. Machine translation may not do so well with that.


That will fail when you have words in different langauges that mean different things.


You only speak English, though, right?




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

Search: