JavaScript For the Rest of Us
First time accepted submitter my2iu writes "The JavaScript programming language is both widely available and very powerful. Unfortunately, since only 6% of the world's population are native English speakers, the other 94% of the world are forced to learn English before they can start using JavaScript. Babylscript is an open source project that aims to translate JavaScript to all the world's languages, including French, Spanish, Chinese, and Arabic. The project has recently completed its 12th translation, enough so that the native languages of over 50% of the world's population are now supported!"
Because having local-language versions worked out so well for VBA - and that isn't even on the internet.
How is this different than every other programming language I've ever encountered? And doesn't writing javascript in, say, Arabic, just make it inaccessible to 99% of the people who like look at your code?
Life needs more saving throws.
Considering current situation with XSS prevalence, javascript obfuscation techniques and content filters bypassing, this will only make matters worse
---------
Thinking never hurt anybody --MacGyver
Javascript keywords are English words but it's quite a leap to suggest you need to know English to learn Javascript! In fact, it might be an advantage to have the keywords as foreign words because they represent abstract concepts that ought to be considered apart from their real world meanings. IMHO.
The programming language is the language, not the english language. You need to learn keywords, they could be klingon, do not need to make any sense for you. On the other hand, documentations are usually written in english.
C'est pas vrai!
I'm pretty sure translating the reserved words in a language is a TDWTF in the making.
Someone pulled this idea out of his ass and thought it was a genius idea.
Sig? Heil
I just took a look at the french translation:
charAt carÀ
charCodeAt codeCarÀ
indexOf indiceDe
lastIndexOf dernierIndiceDe
split fendre
substring souschaîne
I foresee thousands of text encoding bugs appearing everywhere this is used.
function calls, classes, etc which use letters that are not in the English character set. :P No translation needed, just let me type them without getting spammed with syntax errors like happens in most programming languages. And for that matter, I'd be happy if I could even *type* a thorn here on Slashdot without having it magically disappear.
"/etc/rc.d/rc.sysinit is a gimp plugin and must be run by the gimp in order to be used."
Why do they always only mention "native" speakers of a language. They do realize that in total numbers, English is the most widely spoken language on earth (yes, even more than mandarin! By a wide margin). And English is also the unofficial language of STEM at large as well as international business. When I worked at Ericsson, though it's a Swedish company, and only a very small number of employees actually lived in English speaking countries, the official language that all internal documentation had to be written in was English.
Sure, it may make somebody feel warm and fuzzy to translate javascript to other languages, but in the long run it's pointless since to work in engineering, you have to speak English anyway.
Exactly. This is only good for making write-only code more prevalent.
Such as wondrous Slashdot which still sucks at Unicode...
Yeah, let us all hide in our ghettos again, very good for the world.
While very noble, all this native translation stuff and UTF-8, what I see is that more and more people stop trying to reach out and stay in their own culture/circle.
The internet 10 years ago was much more international oriented than it is nowadays.
I would hazard a guess and say that it's easier for a non-English speaker to learn normal JavaScript than it is for anybody to deal with this kind of nonsense.
I don't really see the advantage in this. You would be deliberately segregating yourself from the wider development community, and for what? Anglophones have to learn a lot of this stuff too. An asterisk doesn't mean multiplication to us, yet we learn that. Double ampersands don't mean "and", yet we learn that. Parentheses don't mean "do something", yet we learn that. The equals sign means "equals" in English, yet it's the assignment operator in JavaScript.
There are languages which are designed to more closely match natural language. AppleScript and Basic, for instance. There care also language which aren't very readable at all in English, such as LISP or Perl, that are still very successful. Natural language isn't really valued in the programming world for a variety of reasons. Sure, function calls might have some correspondence with English, but in the end, they are labels, not sentences, and everybody needs to learn what the labels mean precisely, even English people.
Bogtha Bogtha Bogtha
If your assumption is that only people in the US, the UK, Canada, and Australia speak English, then yes, you can say that only 6% of the world's population speaks English. But your assumption would be very, very wrong. Also, as Javascript is not and never claimed to be a natural language, I don't understand why you think you need to learn English before using it. The definition of "for" in Javascript is so far away from the definition of "for" in English that knowing English doesn't help you grasp how it is used Javascript. Certainly English helps, but if enough documentation exists in another given language, it shouldn't be much harder to learn any given computer language without learning to speak English.
The translations look terribly inconsistent and even completely erroneous. The German one, for example, strangely mixes verb forms: "throw" is "wirf" (informal imperative) but "catch" is "fangen" (infinitive). "char" is translated as "aeichen", which isn't even a word in German. Are the "translators" just people with no knowledge of the target language who are simply looking up words in a dictionary? If so I don't see how this project is possibly going to be of use to anyone.
Decades back I used a research OS that was developed pretty much along UNIX lines except that it was written in this Pascal variant where all the keywords were in French (Pascal was popular back then as a first language). It never achieved any traction & disappeared because neither the OS nor the language proposed anything really useful that you couldn't get already from Unix/C or just plain Pascal.
On a more recent level, one of the biggest PITA I and many others have with Office in non-english locales is that they translate the function names.
=sum(a1:a6) becomes =somme(a1:a6). I'ts easy enough to find websites that will help perform actions in Office, but I often spend twice the time finding out lust what wierd name MS has come up with for some VB function.
Is "pour" so much better than "for" for someone who is not a native english speaker? No, as by the time you have become proficient in the computer language, the subset of a foreign tongue it uses become well known & the difference irrelevant.
It looks to me that Babylscript is just a tool for the language bigots out there. Give it a few months & people will have forgotten it.
Democracy is a sheep and two wolves deciding what to have for lunch. Freedom is a well armed sheep contesting the issue
You fail so completely.
http://en.wikipedia.org/wiki/List_of_countries_where_English_is_an_official_language#Sovereign_states
I think that's more than 6%!
For god's sake! Please lets stop translating computer languages.
Presumably these 94% will have put for foray into the javascript dom on hold until that gets translated.
The Japanese like to put their verbs at the end - are they going to accommodate that?
About half the planet like adjectives after the noun - so is going to be array new?
I learned programming in BASIC way before I learned English (my mother tongue is German). It didn't pose a problem at all, you have to learn the keywords character-by-character anyways, since you aren't allowed to make any stylistic modifications to the text. I don't quite see the point in this exercise, especially for languages that use the same writing system.
Additionally, programming nowadays is also about getting more information and help online. When you don't know English, most of the information online is inaccessible to you, and you can't even ask any questions.
This is a really stupid idea!
This is the most idiotic idea I've ever saw.
Will they also translate all the libs, the docs, the books out there?
IMHO This makes JS even less accessible and seriously increases the confusion factor.
Just think how many jobs this will add in the future, all those former COBOL coders retrained to fix Y2K, er, I mean, other-than-English version bugs...
Is it April 1 already? Surely they wouldn't really name it Babylscript, knowing what happened to the Tower's progress after language-splintering, would they?
This is so stupid, it makes me hate to world.
That this is a bad idea with a long history is what makes it so grating, and if it's a joke -- which I hope -- it's one that's been done before, better.
Belief is the currency of delusion.
Umm...Slashdot is now open to the highest bidder?
Maybe the editors need to vet the submissions better.
I can be moderated as Inciteful...
Finally use English programmers change the appearance of GUI widgets by their colour property!
This might be a bit imperialistic, but is a programmer who is not comfortable with English a good programmer? Since there is so much technical info in English, if your English skill aren't they good then you are going to miss out on a lot of good info. I seem to recall an interview with Linus Torvalds where he said that because all source code, etc, he ever saw was in English it never even occurred to him to code in his native language. Someone who wants JavaScript in their native tongue has probably only just picked up "Learn JavaScript in 24 hours"...two hours ago.
when a native English speaker learns a computer language, you might have to learn a function like, say for example, concat()
array1.concat(array2,array3,...,arrayX)
ok, I get it that concat is from the word concatenate. but concatenate, in English, can have all sorts of meanings, and in the context of javascript, that the meaning of the word concatenate should lend itself ONLY to the scenario of arrays, and ONLY to the meaning of joining arrays together... this is rather arbitrary
such that knowledge of English doesn't really advance your learning of the computer language. in fact, weighted down with assumptions from the human language, you might think a function does something else than what it really does
so we all start with a clean slate, from any language background
the point is, you have to learn a computer language means you have to learn a computer language. and knowledge of the human language that some of the functions have cutesy relationships with words from the human language, doesn't really mean much in the end. in fact, it might work against you if you make bad assumptions
you have to learn what? a "vocabulary" of 40-50 "words" to get 99% of the functionality of a computer language? this is beyond the ability of anyone intelligent enough to be engaged in the effort of programming, from any language background?
so i don't really get this exercise. i guess it is good for school kids, but it kind of adds an extra unnecessary layer of incomprehensibility for anyone seriously engaged in programming, beginner or expert
intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
English is the lingua franca of the technical, engineering and scientific domains. It allows anyone to communicate and understand one another, and suits nicely because it's been formed by usage. I can't use my native language (french) for any of my coding - its vocabulary doesn't suit or simply does not offer proper equivalents for many technical terms and expressions. It just plain feels wrong. Besides there's no use being "local" in such endeavors. Really I don't see the point beside the fact it seems politically nice and fancy.
How about an IDE that allows programming in a native language and then saves the resulting code in English.
Then the IDE could be expanded for other programming languages more easily and
doesn't require that a javascript library get tacked on to every page they make with "native language" javascript (webpage bloat is bad). Anyway, I could see this mostly be useful to Chinese programmers since I assume they have to type less? e.g. function is (two characters)
Sig. Sig. Sputnik
After translating javascript you need to translate every javascript library, applications DOM or the translation is useless
I remember a French version of Pascal which makes me laught a lot.
Javascript is maybe around 150 translatable words, I'm sure it's easier to learn by sticking to english instructions and reading tutorial in your native language.
Should be called Babelscript as it reduces comprehension. (See Tower of Babel.) Like APL, a write-only language.
Wow. I've read all the comments (that have been selected) and not one thinks this is a good idea.
Amazing to see everyone agree for a change.
"6% native English speakers" - is that relevent to anything? How many people can *read* (or write) English, as a 1st, 2nd, or nth language? - I'd guess somewhere over 75%, even higher if you consider the simple keywords used in javascript (not that knowing their meaning in real English will help enormously, as has been pointed out). Are there any complicated keywords? I suppose 'function' might not be so often used...then there's CSS (I assume they mean that and HTML too)..."border", "margin", "padding" - they're reasonably common for me, but that doesn't help me in the slightest.
Nope - knowing English isn't much help at all, imo. At best, it gets you over the first hurdle...but there's a whole 800m-worth of hurdles to go with the rest of Javascript/CSS/HTML. Really, it's horrible - and they call Symbian C++ hard! (I didn't think Symbian C++ was so hard - pretty much the same as Android, imo).
Max.
It's the new Lingua Franca! No, wait...
Please do not read this sig. Thank you.
Is this a rerun of The Tower of Babel?
The lingua franca in international air travel is English, so international pilots and all air traffic controllers at international airports must learn English. (See this reference. Maybe we ought to let each airport direct traffic in their own language as well?
Get over it!
That's bullshit, i learned javascript in Colombia as a native spanish speaker.
Slashdot ya no es que lo era!
in the original Klingon.
"My God...it's full of trolls!"
There are other important trade languages and, during the period when computers were getting started, German was still the language of chemistry and our R&D library had lots of engineering textbooks in German. If you don't know basic Italian and German you won't go far with opera. Musical notation is still Italian and I haven't noticed any moves to replace p and f in musical scores with Q and L (quiet and loud). Words like "crescendo" just got taken over into English.
I am all for linguistic diversity, but this is really a straw man argument about learning programming.
From scarped cliff or quarried stone she cries "A thousand types are gone, I care for nothing, no not one."
Oh god, this is such a horrible idea. So they fixed the VBA problem where code developed for the German version of Excel fails to run anywhere else. Good for them. But then they claim that you can mix and match French and Spanish code. This is good how? As a German native speaker I was exposed a Java program written in German. For example, getters and setters were prefixed with "nimm" and "gib". My eyes start to bleed just thinking about it.
If you learn programming you have to deal with complex abstract problems. Learning the arbitrary names of a few keywords doesn't really impose such a cost, compared to the gymnastics you have to make to wrap your head around, say, pointer arithmetic. Okay, so nobody uses that anymore, but what about the difference between a value and a reference (e.g. in a linked list)? Or even simpler: how about the basic concept of extracting common code into a function?
Free Manning, jail Obama.
I can't wait to see the result of the code for the project that my company decided to develop offshore, in India. I am sure that our clients will be pleased to learn that we will not be able to debug a fucking line of code on site.
What a fucking great idea ! yeah !
Why don't you just write it in our beloved Universal Language "Esperanto" ? It should be even easier to maintain... It is UNIVERSAL !....
I believe that sometimes, if nobody invented a specific thing, maybe it's because this thing is fucking stupid. Try it, figure out by yourself that it is so stupid that even your mother would disown you, then trash it forever.
A computer language is, as seen from a natural language perspective, constrained to its reserved keywords. A simple Google query shows that JavaScript has remarkably many - I can count it to be 184 (as seen in http://www.quackit.com/javascript/javascript_reserved_words.cfm). However, is it really necessary to understand the literal meaning of each keyword? Many of those keywords need a short description anyway to use them, and those descriptions alone could simply be written in any natural language of choice. Hence, changing the reserved keywords would only confuse any "English JavaScript" developers.
There are 2 types of people in the world - those who understand decimal and those who don't.
Once upon a time, when computers were not available to all, when it required an investment and expertise to write software, the higher barrier to entry essentially insured that, basically, only well qualified people were writing software.
Today, when anyone with 25 cents can write and compile software, it shows, I believe, in a lower overall quality of software and documentation. In those days I loved my software job; today the software overall sucks so bad I can't stand my job anymore.
This javascript 'enhancement' will only make the problem worse. If like me you think software sucks bad, just wait.
This would be and incredibly stupid move. One of the greatest strengths of code is that it's a shared, common language. You can easily debug someone's syntax on usenet/blog/whatever without having to know their native language.
Sure it's nice to localize and cater to individual cultures, but the reason computer languages are so accessible to beginners is because they don't need to learn the language through google translate. Ever try and debug HelloWorld() in Arabic?
Join the Slashcott! Feb 10 thru Feb 17!
I love progamming in TECO. Because it feels so good when you stop!
Remember, EMACS was originally written in TECO. Does that tell you something about its author?
I'm a "native" English speaker and guess what? I had to learn English too! I wasn't born that way!
Since 100% of JavaScript programmers have to learn at least some English, I demand they translate JavaScript into baby talk! It's not fair that my daughter will need to learn English before she can program.
There are just about 20 or so keywords one has to learn in most of programming languages and one has to learn them anyway, even if they are in one's native language. And if they translate all libraries and APIs -- this makes it harder to learn, because one will only find a subset of forums, stackoverflow posts, etc. while googling about the problem at hand.
Now, if we can only translate Javascript into a less painful scripting language, we'd have REAL progress! *insane laughter*
Now, if they'd only translate Javascript into a less painful scripting language, we'd have REAL progress. *insane laughter*
This is not the first time somebody does this either, there is an entire industry in Russia built around a business platform (1 s) that prides itself by the fact that they have translated BASIC into Russian, I shit you not.
You can't handle the truth.
would you write your code from right to left too ?
The German translation isn't good. They could've easyly improved on the syntax. let ist translated into 'sein' (to be) rather than 'lasse' (let). There are a few other instances were they could've actually improved on the language as a whole but messed it up.
Besides, as others have pointed out: The PL being in a different language than the native is an *advantage*. Less mixing of words. It's great to have native Variables and english keywords - it gives you way more flexiblity with your code.
My 2 cents.
We suffer more in our imagination than in reality. - Seneca
I just typed two in this post - I certainly don't see them.
"/etc/rc.d/rc.sysinit is a gimp plugin and must be run by the gimp in order to be used."
Aside this Babylscript, I sometimes wonder if there's already way too much redundant translations in the engineering world. For example, who needs a crappy article about mini-ITX in Finnish at Wikipedia. That is so special technical information that you oughta learn English anyway. I understand technical articles like Huuto.net (Finnish eBay-like site) that describe a local speciality. Then some game makers strive to have the menu texts in all possible languages, which again is a bit questionable. For games that have lot of text (such as adventure games), translations do make sense.
Unfortunately, since only 6% of the world's population are native English speakers
I've been to countries where the people do not speak English "natively" and I have been very surprised that most of the people speak English (as their second language) better than many people here in the US. While English may not be the first language of a significant portion of the world, English is spoken and understood by a very significant portion of the world's population.
... so what could go wrong?
...by ist own... They need a *java applet* to demonstrate their language?!
I lag
Whoever manages to enable people to program in their native language has a Nobel prize waiting for them. It certainly hasn't happened yet, even for English speakers: if I were to type a few lines of English describing a program, there is no tool out there that would know what I was talking about.
Programming languages are just that: distinct languages of their own, usually characterized by a small vocabulary and highly expressive grammar. It is true that most of the common vocabulary we see between languages -things like if, else, function, while, class; perhaps some 100 words in total- are pulled from English, but although these words share some meaning with their English counterparts, those meanings -both in terms of semantics and in terms of grammatical significance- are also far more narrow and rigidly fixed: more comparable to mathematical symbols than words. Learning to program will not teach a person to speak English, nor the reverse.
I suspect that this is why complaints from non-native English speakers are rare to nonexistent: the advantage gained by speaking the language from which these words derive is trivial. Redefining the symbols to have synonyms pulled from other languages doesn't really solve the problem; indeed, it only makes matters worse by multiplying the number of symbols without adding any new meanings. That sort of obfuscation serves no one.
If you want people to be able to program in their native langauges, you need a completely different approach: natural-language processing that compiles down to object code of some kind.
Underwritten, no doubt by the People's Army Central committee to speed the plow for industrial and military IP espionage.
As a kid I learned Basic before learning english. Language was not a barrier at all. the only prpblem is that i would say "If we go out THEN lets GOTO the movies" and 30 years later i still think of those keywords first in a code context.
I think he meant using them in the code. Java, JavaScript, C# and VB all allow that, for example. So does Python and Ruby.
As most people here don't give a shit about non-english.
Now, admittedly, I don't think this is exactly an excellent idea, but let me try and dispel a couple of misconceptions here. Firstly, that the "host" language doesn't matter because code isn't in English to begin with.
That's bullshit.
If everything you needed to understand a program was it's syntax and function definitions javascript would kinda look like this:
That is, with all keywords and punctuation chosen at random. That simply is no way to help the programmer get things done. Both the keywords and punctuation, as well as identifiers must be easy to remember. There is a reason we don't chose punctuation and identifiers at random.
Second misconception is that every programmer writes in English. Being a Mexican coder I can attest that most enterprise code is written with Spanish identifier names. That's even a guideline for some people. If an identifier is in Spanish they know they can check the source code, if it's in English it's part of the language, or the framework or a library and you don't bother checking the source.
And it makes a lot more sense that you people would think. Enterprise code tends to be overly specific, choosing English identifiers in an Enterprise environment means that you will end up changing the terminology and this custom software is usually written for experienced teams that already have developed a terminology that matters to them so there's value in keeping everything consistent.
I can only guess that code written in India or Japan would also use Indian or Japanese identifiers.
Now keywords... yeah, let them be English. The advantage of changing them is negligible compared to its downfalls.
But... the future refused to change.
Consider PL/I, which had no reserved words.
Not saying that was a good idea, mind you...
To a Lisp hacker, XML is S-expressions in drag.
I once had a co-worker who spoke fluent Spanish, since he grew up in Puerto Rico. He was called upon to go to Mexico City to teach some programming classes. Before he went, he brushed up on Spanish words and phrases that dealt with programming and technology. As he started teaching the class, he found that his students were not understanding him. He finally realized that they didn't know the Spanish words he had brushed up on! He switched back to using the English versions, and everybody was happy.
Just as Arabic numerals are the language of math around the world, English is the language of computing around the world.
I'm sorry for everyone who is wasting time working on this ...
Just went ahead and tried Python again. Doesn't work.
#!/usr/bin/python
# coding: utf-8
ð = 3
print ð
Okay, fine, let's add a coding statement:
#!/usr/bin/python
# coding: utf-8
ð = 3
print ð
Think I also tried Javascript recently and it was broken, too. And I know C++ complains, at least with g++.
"/etc/rc.d/rc.sysinit is a gimp plugin and must be run by the gimp in order to be used."
Just went ahead and tried Python again. Doesn't work.
Are you using Python 2.x? That's ASCII only. Python 3k is Unicode.
Think I also tried Javascript recently and it was broken, too.
That would be a non-conforming implementation of the language - per spec, it should permit "any character in the Unicode categories: “Uppercase letter (Lu)”, “Lowercase letter (Ll)”, “Titlecase letter (Lt)”, “Modifier letter (Lm)”, “Other letter (Lo)”, or “Letter number (Nl)”.".
And I know C++ complains, at least with g++.
C++ is kinda funny. It permits Unicode identifiers as of C++11, but it has a very vague notion of input encoding and such. Implementations are free to accept UTF-8 and the likes, but they're also free to reject them, so in practice if you want to be portable you have to use \uXXXX escape sequences, which of course defeats the point of Unicode identifiers (unless your IDE renders them as symbols). I don't know the state of Unicode support with g++, but MSVC will happily understand both \uXXXX and literal UTF-8 in identifiers, though for the latter it needs to see the UTF-8 BOM at the beginning of the file.
So now if I mix all the languages I know into the code I write nobody but me will have a chance to read. I can even safely start using comments again so I know what the code was meant to do two days later without risking my job security...
=~ s,(.*),<sarcasm>$1</sarcasm>,g if any_point_you_wish();
The APL programming language has no human language bias, as far as I can recall, but the TUI (Terminal User Interface, where "Terminal" refers to the Interface, rather than the User) does. It has commands like )LOAD, )SAVE, etc.
Slashdot mangles the thorn for some inexplicable reason
The reason is perfectly explicable: past abuses of directional overrides.