Go Down

Topic: Philosophical debate on language leads to question (Read 2 times) previous topic - next topic

flyboy


Chuckz


Are there compilers that work in other languages ?

i mean, as far as I know, C language (and every other programming language I 've encountered) is basically English.   And a rapid search with the help of our googly friends didn't tell me more.


All they have to do is a cut and paste from English to another language concerning the commands of any language.

hardcore

Compilers are lexographic translators, the do not working in "English", it just so happens that some of the lexographic symbols 'resemble' English words.
Much of the language has its basis in mathematics.

Whilst you may say " for (int loop=0; loop<8; loop++)" ,it is no more English than "Typhoon" ???? or "Sampan" (??).
For it to be English then you should be looking at:

Can you please loop round the following:
......
whilst the count is less than 8.

HC



tomperdarwin

#18
Feb 03, 2012, 12:00 pm Last Edit: Feb 03, 2012, 12:03 pm by tomperdarwin Reason: 1
Under that logic everything typed that does not conform to the exact rules of the language, ceases to be english.

consider : " I ARE A CAT " is not english , sure lexographically teh words are all english, but as a sentence it isn't.

( and that typo in 'the' ruins my sentence too, as does lack of capitalising and puntucation  )

INT ( eger ), FOR, LOOP, WHILE, and so on are all english words... that's the point

AWOL

Changing keywords/reserved words in a programming to match the native language is relatively simple, but imagine, for instance, COBOL in German, with the verb at the end!   :D
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

justjed


Changing keywords/reserved words in a programming to match the native language is relatively simple, but imagine, for instance, COBOL in German, with the verb at the end!   :D


I once worked with a guy who figured out how to modify the symbol table in the CDC COBOL compiler so that his most frequent typos would still work. This was just for fun, of course, because you don't send code to production with 'perfrom' instead of 'perform' scattered here and there. Hmmm, might have been under VMS -- we were using both, and that was back in the early 80s, so I don't remember the gory details.
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier

Nick Gammon

I've wondered about that for a while, but in the end I think it doesn't make a huge difference, if you speak English natively or not. Even for English speakers, C initially looks pretty obscure, for example:

Code: [Select]

^      exclusive or
%      modulus
++     add 1 to itself
--     subtract 1 from itself
&      bitwise and
|      bitwise or
&&     logical and
||     logical or
~      negate  (plus destructor)
{ }    group stuff into a block
!      not <something>
< >    templates
#xx    some obscure compiler directive
\xx    some "escape" sequence
void   huh?
int    a number?
char   a letter?


It's not as if a native English speaker can pick up C++ code and just know exactly what it means. And for non-English speakers, they just have to add a few more things to the list, like "if" and "while". And even English speakers have to learn stuff like "if (a = b)" won't work as you expect.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

AWOL

Even mathematicians have big problems with C
Code: [Select]
x = x + 1; is clearly nonsense!
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Nick Gammon

Just subtract x from both sides, AWOL, then it becomes clearer:

Code: [Select]
0 = 1

Oh, wait ...
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

CrossRoads

No problem, at that point you just multiply both sides by a number that allows you to get an engineering estimate where boths sides have a common numerator ....

0 * 0 = 0 * 1

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Nick Gammon

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

retrolefty


Go Up