8 ms·
Show HN: Programming in non-English languages
- pjc50 11y agoThis is a good idea. There are tiny differences even between en-GB and en-US. 'Colour' is the most common one, with documentation calling '#' the "pound symbol" instead of £. The first programming languages I encountered were on the Sinclair Spectrum and BBC Micro, which being British used the British spelling of COLOUR in BASIC.
- gus_massa 11y agoA few examples (perhaps HelloWord and Fibonacci) in other languages would be nice. From an informal statistic I propose German and French. (and I'd like to add Spanish, because I speak Spanish.)
- theSage 11y agoI added a sample example file and an example maker. Thank you for the feedback.
- emersonrsantos 11y agoEnglish will always be a barrier to non-speakers when it comes to computing. This is great. On a side note: is there any idiom-agnostic programming language? I only know that APL is.
- elros 11y agoI coded in a Brazilian Portuguese version of Logo at school. I remember there was also a Portuguese Portuguese version of the same toolkit. Both were called Megalogo. On a related note, "idiom" in English does not mean the same as "idioma" in Portuguese ;-)
- theSage 11y agoThe same for Hindi. For some reason Google decides to translate the same word differently when I go through an API and when I do it in browser.
- emersonrsantos 11y agoI meant idiom-agnostic as format-agnostic, collective, universal: like math, music, etc...
- pjc50 11y agoMusic is not universal (different scales are in use), and maths uses Roman & Greek lettering with the Arabic number system.
- devnonymous 11y agoThis is pretty neat. I've not taken a close look at the implementation but I'll definitely do that (if it isn't a whole lot of effort could you please describe/document the design and approach taken ?) I've had thoughts about solving this problem previously but never acted on it. My thoughts on this however were along the lines of providing the ability to re-define the keywords and builtins as part of the interpreter itself in such a way that even the prompt could accept non-english input. Thinking about this is natural when one is Indian[1] and ends up working with some really talented people who have weak English skills simply because their primary education was conducted entirely in a non-English medium. A lot of words used to express programming ideas are difficult for non-native English speakers to remember even if the ideas themselves are not (think abstraction, encapsulation, introspection, reentrant, idempotent ...etc) and the effort required to remember and use them correctly when communicating with other devs is higher (IMHO) for non-native English developers. Of course this is non an India specific issue, and of course English is the lingua franca of technology but that shouldn't be the barrier to entry for learning programming. kudos on the effort once again ! [1] one country, and a multitude (22 according to http://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers_in_India http://en.wikipedia.org/wiki/List_of_languages_by_number_of_... ) of 'official languages'
- czechdeveloper 11y agoI'm not native English speaker, but I wish people would just accept that English is Latin of computers. I still have to come to servers installed in German or French and guess by memory where stuff are.
- timonoko 11y agoIt is really horrible when local civil servants start to invent translations for English words, which did not mean anything computer-related to begin with. Like Spool and Cache and Cookie. Why cant browser's Cookie be just Cookie, it is easy to vocalize in any languiage. Why they want to translate Cookie into local bakery term? It does not raise level of comprehension any.
- blowski 11y agoPartly because 'cookie' requires the latin alphabet, and the ability to pronounce those sounds (it's not as easy as you think). If you're trying to avoid dilution of your language, you may want to come up with your own localised words.
- j-pb 11y ago> dilution of your language Let me guess, you're french?
- blowski 11y agoNope, British. But I'm interested in linguistics, and how English affects other languages and the communities that speak those languages.
- j-pb 11y agoI don't see how this is a bad thing though. The more cultural and linguistic bonds there are between nations, the happier everybody gets. More empathy, less war, easier trade, more friends and more options for living and working wherever you like.
- patrickg 11y agoMy database publishing system's programming language is both English and German. While programmers usually prefer the English interface, a rather large percentage of my users prefer the German one. (en: https://speedata.github.io/publisher/manual/index.html https://speedata.github.io/publisher/manual/index.html, de: https://speedata.github.io/publisher/manual/index-de.html https://speedata.github.io/publisher/manual/index-de.html) There is also for example ConTeXt (http://wiki.contextgarden.net http://wiki.contextgarden.net) - a typesetting language similar to LaTeX, which supports commands in English, Dutch and German.
- Buetol 11y agoNice, just one suggestion: The languages are just dictionnaries: You should store them in an human-readable language instead of pickle. So it's easier for people to correct errors (json, yaml,..). For example, `FR_example.py` have "else" instead of "sinon" but to correct it I would have to open the pickle file and modify it in my terminal.
- j-pb 11y agoI don't really see the point of adapting the programming language to the learner, which seems to be the smallest language hurdle, when they'll have to ask for help in english on forums, in IRC, or on SO, anyways.
- theSage 11y agoThink third world. The kids in my village have a single computer without Internet. Sure they will need to learn English since almost the entire literature is in English, but they may yet taste the joy of programming first. It makes little sense for them to think in one language and write in another. But, I do see your point.
- pjmlp 11y agoThere are local programming forums in most countries.
- zogwarg 11y agoFundamentally I think that the effort is flawed. Languages don't really map to each other on a word to word basis. At school in France they introduced algorithms with a form of french pseudo-C which was very frustrating, because it felt stilted and unnatural. Expressing the same algorithms in natural french would already be a much better exercise, because you don't have to force yourself through a fake translated language. Ultimately I think this would be a much better first approach to programming, (with more focus on design than implementation). In the end if you really have to implement code, you will have to learn the english version anyway if you want access to documentation and outside help.
- shash7 11y agoAs a Hindi and Gujarati speaker, the use of word 'chapp' for print is highly amusing.
- theSage 11y agoThis was indeed intended.
- nissarup 11y agoYay! Python in parseltongue!
- tragomaskhalos 11y agoAll I see is a blank page - what am I doing wrong ? ;-)
- sdrothrock 11y agoRelated: http://www.wikiwand.com/en/Non-English-based_programming_languages http://www.wikiwand.com/en/Non-English-based_programming_lan... I was actually really fascinated by the idea of a Chinese C++ in all Chinese: http://baike.baidu.com/view/1718420.htm http://baike.baidu.com/view/1718420.htm
- cmenge 11y agoAttaining a level of proficiency in "English" required for programming (keywors, mostly) is incredibly simple, if required at all. Just accept the fact that 'for' loops in some way. In mathematics, you will also have to learn what the uppercase sigma means, hell, they even use the greek alphabet!
- thomasfoster96 11y agoPfft - Hasn't PHP had error messages in languages other than English for years? --- Seriously though, I'm a bit surprised that people are so dismissive here of the need for having programming languages that use function/method/statement names that aren't in English. Learning a foreign language and a programming language is something that's pretty incredible as far as I'm concerned. I'm pretty lucky that English is my first language and that function, method and statement names are pretty descriptive given they are almost always written in my native language. If I had to spend a lot of time trying to memorise another language whilst also learning a programing language, I highly doubt I would have been able to do even 20% of what I can do today. I mean, nobody speaks any language remotely like assembly - higher level languages exist because they're easier to understand and use, at least in part because they use a lot of English word to describe what's going on. I can't see any problem with more work being done on making more tools (transpilers perhaps?) for people who speak languages other than English. Heck, we've done some pretty awesome things transpiling to/from JavaScript lately, why not start transpiling from a variant of JavaScript that uses Arabic or Mandarin to the English variant of JavaScript?
- alehander42 11y agoHey, that looks awesome! The implementation approach is really simple and that's cool for a prototype, however in order to work well for libraries and the standard library, we need to use the ast. If you want, I can make a pull request with an ast-based translation(I have a lot of experience playing with python's ast) ?
- theSage 11y agoSure, would love that. Pull away!
- hayksaakian 11y agoThe language itself isn't really the problem its the documentation and public resources surrounding it. Having learned some japanese, I could see myself learning programming just the same so long as stack overflow and the various docs websites were English.
- deleted 11y ago[deleted]
- ifdefdebug 11y agoWell it's not as easy as some of the posts here suggest, like all you need from English is "if", "for", "while" and little more. Don't forget about the libraries coming with each language. You'll also have to map "memcpy" to "memory" and "copy" and know those words, or understand what a "TreeViewItemCollection" is for, just to give two examples out of tens of thousands. Said that, I think trying to localize programming just isn't going to work. If you want to program, you'd better get along with the English language.
- mrfoo-de 11y agoNice idea - but I prefer english, even it is not my mother tounge. But cool project - may be I can adapt it to another thing. :)