if user.hasFoo() and company.isBar() then baz.play( jazz )
In German: if benutzer.hastFoo() and firma.istBar() then baz.spiel( jazz )
That's five language-switches in a single line. Much, much harder to read. (granted, only one if the language uses && and braces instead of and and then)Yes. Maybe not harder, but more strenuous.
> No proficient coder will be reading lines of code as English sentences
In that case, I'm not a proficient coder. Neither was the inventors of the IF..THEN..ELSE and WHILE .. DO .. and DO .. WHILE .. statements. Or the guys who made the convention to use hasXX/isXX for boolean getters. Or LINQ.
> I don't think having a few keywords in a different language makes much difference.
I do, and I've coded and maintained a lot of code in both camps. And, we're not aiming for "much difference", we're aiming for "easier".
> You might just as well say that the switch in languages makes the code easier to read, since it separates out keywords from variable names.
Well, I don't think any proficient coder has any problem with that. We have syntax (and syntax highlighting) for that purpose.
So, what you actually mean to say here is "no"? Sorry, but I just don't see that having non-English identifiers makes it any harder (or more strenuous) to read.
>In that case, I'm not a proficient coder.
You certainly are not proficient if you attempt to read lines of code as English sentences because they happen to contain a few English words.
>Well, I don't think any proficient coder has any problem with that.
Nor will any proficient coder have a problem with a few English keywords.
Well you can't be sure of anything, but sometimes you know for more-or-less certain that English speakers aren't going to read the code.
http://www.chinesepython.org/cgi_bin/cgb.cgi/english/english...
Most multi-nationals have coding standards that mandate the use of English though. But you'd be surprised how many companies that grew to be multi-nationals from regional companies have tons of code documented and written in the native language.
Why? This might make sense for open source code at the moment, but if it's code internal to (say) a German organization, commenting in the native language of the coders is likely to be easier and lead to less confusion.