views:

351

answers:

18

Some people have trouble doing programming with syntaxes taken from English. Would you program better if (well, this is a big if) the programming language syntax were in your native language?

+2  A: 

Nope, I don't like Dutch. English is easier and better.

Time Machine
This is not allowed here mate. Flagged as offensive.
Shoban
I'm missing something. Why is that offensive? In the context of languages "I don't like Dutch" implies the Dutch language. If he said "I don't like THE Dutch" then I could see your point as it then becomes racist.
Colin Mackay
It's not a very useful answer, so probably deserves a downvote but I agree with Colin, it's a comment about the language, not the people. Also, for what it's worth, I think ZOMFG is Dutch.
therefromhere
Agreed; "offensive" vote cancelled.
Marc Gravell
By the way, why would I be a racist? I am Dutch. I simply think my language is more difficult than English.
Time Machine
I don't see this as offensive, or even useless. I am Maltese, but I don't like using my language for anything beyond casual conversation, English is much better in that regard.
Jean Azzopardi
Agreed with the OP, Dutch is far too complex to program in. English has the superficially simple syntax to make programming in it, work.
bart
Agreed, I really hate macro languages that translate the macro commands to the current language.
Gamecat
A: 

Programming language is not english ;-) Will another person understand if you tell him

if (foo>bar)
    echo "foo is greater";
else
    echo "bar is better";

Think about the world today. Programmer from another country supporting an application developed by a developer from another country. Will this be possible if we had programming languages in native language.

Shoban
Me not say English, me say taken from English. :D
Adrian Godong
+11  A: 

About 6 or 7 years ago my upper secondary school had a IT & economics class where we used excel. The version of excel we used was in norwegian, and so was all of the syntax; if(...) had become hvis(...) etc. This was probably why i havent used excel since then.

Do not mess with Programming Language syntax, it will never catch on and it will ultimately be a waste of time.

Tore
Translated VBA keywords... *\*shudder\** indeed.
Thorarin
+1  A: 

It probably makes it easier for beginners to memorize and digest concepts of programming. I remember when I was in school in Vietnam and first introduced to dos programming, I had to first memorize the meaning of the keywords in order to better memorize the syntax and usage of a keyword.

mqbt
+2  A: 

1) I used to be an OS designer. I once contracted to write a device driver for a DataSaab (of Sweden) minicomputer in what they claimed to be some procedural langauge. The source code arrived, and the programming langauge was something DataSaab had designed, complete with Swedish keywords, Swedish variable names and Swedish comments. I like Swedes but don't know Swedish, and this contract ended badly for me, so the answer is clearly yes.

2) I work with customers in Japan that build large embedded C systems. Fortunately, the C compiler they use has the standard keywords. But they write comments in Japanese.

I'd say the answer was clearly yes.

Ira Baxter
+1 It's not so much the syntax, but the language used by the programmers for comments and identifiers.
Jeffrey Kemp
By yes you mean you do code better in native language. :D
Adrian Godong
+1  A: 

@Shoban's answer

I liked your example, so I took it and translated it with Google Translate to Chinese (Simplified)

如果( foo的“酒吧)
    回声“ foo是更大的” ;
其他的
    回声“酒吧是更好地” ;

What did I learn from this example? I learned that 酒吧 is "Bar" in Chinese

(Sorry, for creating a whole answer instead of a comment but comments don't indent)

Mike
A: 

No, language is not logical at all. Programming is logical. Easy ways to express yourself.

uriDium
Lolz, I want to express myself: I'm mad so I do: file_delete("C:\windows\explorer.exe");Just kidding, I know what you mean
Time Machine
A: 

Then not Belgian either. They're evil. (c) Dr.Evil

User
Belgian is not a language ;) Flemish is just Dutch with a twist, and most of the rest speak French.
Thorarin
French is a nice language.
Time Machine
How can French be nice, when many Canadians use it? ;)
kenny
Well... Canada rocks!
Time Machine
+3  A: 

After writting in English for so long, I must say that I have come to like it better (with a few reservations) than my native language. I properly also write it better than I write Danish, at least I write more English than I do Danish.

So no I cannot see how changing a few keywords would alter my ability to program. I don't even see the if statements anymore, all I see is blond, brunet, ...

tomjen
+1 for the Matrix reference
MiseryIndex
A: 

There is a programming language called 1C, it's syntax is in russian. Person who decided to do that should be beaten to death.

I'd absolutely hate it if I had to code in russian. Would probably feel like native english speakers coding in LOLCAT language. Bar the LOL part.
Eugene
+1  A: 

As another example of why the answer is No, consider the original COBOL language. Here's how you would calculate the zeros of a quadratic:

MULTIPLY B BY B GIVING B-SQUARED.  
MULTIPLY 4 BY A GIVING FOUR-A.  
MULTIPLY FOUR-A BY C GIVING FOUR-A-C.  
SUBTRACT FOUR-A-C FROM B-SQUARED GIVING RESULT-1.  
COMPUTE RESULT-2 = RESULT-1 ** .5.
SUBTRACT B FROM RESULT-2 GIVING NUMERATOR.
MULTIPLY 2 BY A GIVING DENOMINATOR.
DIVIDE NUMERATOR BY DENOMINATOR GIVING X.

Admittedly, there is a less wordy way of expressing this.

(Example stolen from Wikipedia)

EDIT: for those who don't know the history of COBOL, it was designed (in the 1950's) with a syntax that resembles English so that non-technical people types could write programs. It patently did not succeed in that goal.

Stephen C
Yes, you can write it this way in COBOL.Or you can use COBOL's COMPUTE statement and write what looks like a conventional expression. All this shows is that you can write bad code in any language.
Ira Baxter
Why is this downvoted? It's an excellent example of why mixing up programming with natural language is a bad idea. The fact that you can do it simpler even in COBOL doesn't change that. A programming language should be very simple at the core, and not verbose, like this.
bart
@Ira Baxter you have entirely missed my point.
Stephen C
A: 

"I'm thinking about syntactic sugar, you can switch the "keyword set" between languages. You can see the code in English if you'd like."

That wouldn't constitute a "native language". Grammar is so divers, it's not enough to simply switch keywords. In fact, it would make even less sense if you'd only exchange keywords.

Rough illustration:

if (x > y) {
    echo "X is bigger than Y!";
}

もし (x > y) ならば {
    "X is bigger than Y!"を出力;
}

So, I'd go for No.

deceze
A: 

I prefer programming in English, especially with frameworks like Ruby on Rails which depend on some language rules. Sometimes I use the transition from my mother tongue to English as a formalization step. (Outlining in German, English names for fixed, formalized concepts).

It can be an advantage to call some things (objects, classes) with your mother tongue (if it's not English) to disambiguate it with language or framework-specific keywords like "class" and so on. It seems to be common practice to use "klass" or "klasse" (German word for class) among English-speaking programmers, not only in the KDE world ;)

bb
A: 

I think IBM tried this once for some printer language that was translated into German. Big flop. Personally, I don't see the benefit. If your English is SO bad that you can't even remember "if", "while", "return" etc, then you definitely have more urgent problems than learning how to program.

Kim
A: 

No.

Localized documentation, maybe. But the programming language? Who cares?

The level of abstraction on which one works when solving a programming problem goes way above the language of the keywords.

I have never felt that the few keywords in a programming language get in my way, even if I am not a native English speaker. Hell, in my first job with a US company they were amazed that I did not know what "napkin" means, after passing hours of technical interviews. My answer was "I don't need napkins to program" :-)

Mihai Nita
+2  A: 

I'm French...I use English variable names, I even write comments in English.

English is universal. We have enough incompatible standards already !

peufeu
I think anything in the entire world should be English.
Time Machine
You must have left France or the language police may be knocking, dude! :)
kenny
lol, no I'm still thereI still buy all my programming books in English, though ;)
peufeu
+4  A: 

Yes. I am 100% certain that we all would. Anyone who says differently is deluding themselves based on habit.

However, the benefit or global interoperability of syntax is much bigger. There's people from all over the world discussing specific programming problems on here. If the syntax were localized, this would be almost possible, since you'd have to translate the syntax as well, and probably make mistakes in doing so.

Also, language keywords are nothing compared to API libraries. Having native keywords would be pointless without a native version of API libraries, since those make up a bigger part of most code than keywords do. Having e.g. the entire Java standard API translated into incompatible language versions is obviously absurd. Of course you could have interoperability based on an "internal" name that is not translated, but then people would probably start refering to the methods by that internal name (which would probably be in English).

Michael Borgwardt
Hmm... yes, interesting point. Not only you have to translate keywords, but libraries as well.
Adrian Godong
+2  A: 

Reminds me of Literate Programming as described by Donald Knuth.

A methodology that combines a programming language with a documentation language, thereby making programs more robust, more portable, more easily maintained, and arguably more fun to write than programs that are written only in a high-level language. The main idea is to treat a program as a piece of literature, addressed to human beings rather than to a computer.

I really wonder how this would go about given the kind of discussions design meetings have in real life.

nik