Quote:
Original post by SteveDeFacto
I've been wondering how exactly Japanese and other nationalities program a language like C++ when it's using English characters?
In my company, we have deutsch.hh:
// deutsch.hh - internal use only#ifndef DEUTSCH_HH_INCLUDED#define DEUTSCH_HH_INCLUDED#define fuer for#define falls if#define andernfalls else#define solange while#define tu do#define haupt main#define ganz int#define natur unsigned int#define gleit float#define zeichen char#define zurueck return #define caus cout#define cein cin#define cfehl cerr#endif // DEUTSCH_HH_INCLUDED
We use it like that:
#include <iostream>#include "deutsch.hh"natur fakultaet (natur u) { falls (u<=1) zurueck 1; andernfalls zurueck u*fakultaet(u-1);}ganz haupt (ganz argc, zeichen *argv[]) { std::caus << "Guten Tag, Welt!\n"; natur zahl; std::caus << "Geben Sie eine Zahl groesser oder gleich 0 ein, bitte!\n"; std::cein >> zahl; std::caus << "Ah, sehen Sie! Die Fakultaet von " << zahl << " lautet " << fakultaet (zahl) << "\n";}
We are lucky. Thanks to The English Language being a Germanic Language, our characters are very similar to yours (more exactly: *your* character-set and language are trivialized and quite simple versions of *our* stuff!). The only things not supported by C/C++ are ä, ö, ü, Ä, Ö, Ü, and our unique ß but it is valid in The German Language to emulate them everywhere with ae, oe, ue, Ae, Oe, Ue, and in contexts where ß is not available, ss is allowed.
On a more serious note: I often see mixtures of english and german code, often enough with variable names like oldRechnung, orderNeu, et cetera. Personally (and many other coders, of course), I stick with english, in comments and code.
On another serious note: English is quite simple to learn to the moderate german.
Tip of the iceberg:
> der Hund, die Frau, das Auto, die Jungs, des Gebäudes
> the dog, the woman, the car, the boys, the building's
Quote:
Original post by owl
English programming sintax *IS* easy for non-english speakers. I remember this logo course I took when I was 7, all the kids got the idea quite easily, and logo commands are not even words.
Full agree. Especially C and C++ and similar don't have many key
words.
Note that there are also languages where you don't need any ken of english or any spoken language:
Quote:
APL
[...]
The following function "life", written in Dyalog APL, takes a boolean matrix and calculates the new generation according to Conway's Game of Life:
[...]
.