|
From: Felix on 8 May 2008 14:26 Thanks to all you guys here. This is a fantastic NG :-) It works perfectly now. greetings Felix
From: Joseph M. Newcomer on 9 May 2008 10:19 Identifiers are just identifiers, and the language shouldn't matter. Back around 1968 we had a French graduate student working on our project. He did not return the next year, having decided that being several time zones and an ocean away from home was too stressful. So I was given his code to maintain. It was written in French, a language I have little knowledge of. I was completely lost. Fortunately, our project leader was French-Canadian, so we sat down and translated it one afternoon. But yes, the use of the 7-bit subset causes serious problems. Now imagine that you are in a society which does not use the Roman alphabet, and it is even more confusing. I was shown a Japanese workstation on a trip to Japan. It had the ability to create, using a bitmap editor, new Japanese characters as needed. Then there was a mapping to the 7-bit subset. A few years later, I got a program which had been written by a Japanese programmer, in C. It looked like the kind of text you get from "obfuscated C" produced by a source-protection scheme. Identifiers that were nonsensical strings of 24 characters. Yet, an ordinary C program would appear that way to a Japanese programmer who had no encounter with English. A very enlightening experience. Back in the days of Algol (1958), there was agreement among the academics that the reserved words in the language like begin, end, for, while, do, if and so on would be in English because all the academics spoke fluent English (in fact, most international standards committees tend to use English because it is often the only language they have in common; I remember once being on a tour at an international conference with an Israeli, two Italians, a Spaniard, a Norwegian, three Frenchmen, a Japanese, three Germans, three Americans and two Canadians, and while the non-Americans could speak several languages well, *everyone* spoke English well. This is a typical academic mixture. Our tour guide was relieved because she could conduct the tour in only one language). The result of the decision made in 1958 introduced an era of ethnocentricity in which it was assumed that anyone clever enough to program obviously spoke English, an assumption which has limited the use of computers severely. During the Cultural Revolution in China, languages like English were felt to be Completely Unacceptable, and programming had to be done in octal or hexadecimal to be culturally acceptable; this set the Chinese computer field back a good ten years, at least, during an especially critical time in its development (or so our Chinese member relates; he was a world-recognized theoretician, and he claims he had to become so, or give the field up entirely since he found it offensive to program in octal. He retired many years ago, back in the early 1990s, and is probably now in his eighties, if he is still alive) joe On Thu, 8 May 2008 18:41:40 +0200, "Giovanni Dicanio" <giovanni.dicanio(a)invalid.com> wrote: >That's very interesting! Thanks for sharing. > >BTW: When I was learning the art of programming in C, I started using >identifiers (for variables or function names...) written in Italian (because >I was both a programmer super-beginner and an English language >super-beginner :) > >...But I had problems, because in Italian we have vocals with accents like � >� � � � � ... and it was impossible to use Italian words with these accents >as valid identifier in source code! So I first started converting the >Italian accented versions to English non-accented characters (e.g. '�' >became 'a', both '�' and '�' became 'e'...), but the spelling was of bad >quality, so I decided to use only English for identifiers (even if comments >were written in Italian...). > >Giovanni > > > >"Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio >news:gv962418na0slt5p0nil5faka8msi73v2l(a)4ax.com... >> Note that there is a lot of demand to extend the lexical set of languages >> to include >> national characters beyond A-Za-z_. >> >> There is a wonderful essay, I forget who wrote it but it dates back to the >> early 1930s, >> about "simplified spelling", where letters like "c" are replaced by either >> "s" or "k", >> silent letters are dropped, and so on. As each rule is proposed, it is >> immediately >> applied to the text, so that by the end of the essay, the text is almost >> unreadable, but >> greatly simplified. A parody of this was written by a Scandanavian >> programmer, because he >> points out that letters such as � � � and � are fundamental to the >> language, and it makes >> no sense; he poses "what would happen if the letter i or c disappeared >> from English?" and >> begins to apply the rules, showing how the spellings degrade. He was in >> particular >> complaining about the highly ethnocentric attitude that only the 7-bit >> ANSI subset is >> valid (and even languages whose code pages have letters like �, �, � can't >> use them >> because they are not in the lexical set of the programming language. When >> this >> long-overdue change happens, we will probably have to have a >> GetProcAddressW call added. >> But for compatibility, there probably will not be a GetProcAddressA >> because of overload >> rules. >> joe >> >> On Thu, 8 May 2008 18:06:25 +0200, "Giovanni Dicanio" >> <giovanni.dicanio(a)invalid.com> >> wrote: >> >>> >>>"Joseph M. Newcomer" <newcomer(a)flounder.com> ha scritto nel messaggio >>>news:hq6624509f4gl8951orr38hrkkfi3scnkr(a)4ax.com... >>> >>>> pFunc = (MyFuncType)GetProcAddress(hMod, "myfunc"); // not _T() >>>[...] >>>> but for this one, using the _T() notation would generate an error when >>>> you >>>> did a Unicode >>>> compilation. I like to make this explicit. >>> >>>And I think that your are right to point out that. >>> >>>I think that ANSI-only version of GetProcAddress is because function names >>>must be US-ASCII only in C/C++, e.g. I think that I cannot name a C/C++ >>>function "perch�" (because of non-US character "�") >>> >>> void perch�( ... ) // C/C++ error >>> >>> void perche(...) // all right >>> >>>Giovanni >>> >> Joseph M. Newcomer [MVP] >> email: newcomer(a)flounder.com >> Web: http://www.flounder.com >> MVP Tips: http://www.flounder.com/mvp_tips.htm > Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
First
|
Prev
|
Pages: 1 2 3 Prev: CodeGear is sold Next: Language change is not retained on language bar in mfc application |