From: Tor L. <tm...@ik...> - 2009-04-02 09:47:04
|
Adding the list back to Cc:. Discussions that start on a mailing list should continue there. (Unless they turn into stricly personal issues not related to the list topic at all.) > tml, Can you characterize an idea as stupid before puting that idea to > work on practice and see the results? Great! For an idea as monumentally silly as this one, I definitely can. Anyway, I will try to be more helpful. If you really want to just translate the keywords, have you thought of using preprocessor macros? Assuming the language you have in mind is Portuguese (based on your email address, sorry if wrong): #define se if #define quando while #define para for #define flutuador float #define dobro double #define assinado signed etc. (Translations of individual words by Yahoo babelfish, so might be wildly improper for this usage of course.) Ditto for standard library functions presumably. This won't help for the preprocessor directives though, they would still be in "English" like "include", so maybe you would need to write a minimal shell script that would run the source code through sed, perl or whatever first instead. Anyway, my main point is that changing the compiler itself is not needed. Error messages will still contain the original keywords, but to "fix" that need just edit the message catalog source file (.po file) and for the language in question to show the translated keywords instead then, and regenerate the message catalog. Will that really make it easier to program in C for people speaking Portuguese but not English? Don't think so. It's not the apparent human language the keywords are written in that makes programming hard. (The C keywords and syntax aren't really English, as a non-programmer would understand it anyway. Since when is "int" an English word? Since when is "double a;" an English sentence? Translating COBOL would perhaps be a better idea...) Or then, just use APL instead. Or the esoteric programming language whose name starts with "Brain" and the rest is a four-letter word. No Anglo-Saxon cultural imperialism there! --tml |