|
From: Giovanni Dicanio on 8 May 2008 12:06 "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
From: Joseph M. Newcomer on 8 May 2008 12:29 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
From: Alf P. Steinbach on 8 May 2008 12:32 * Joseph M. Newcomer: > 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. I think that was Mark Twain. Googling... Yes, <url: http://www.google.no/search?q=mark+twain+spelling>. :-) Cheers, - Alf -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
From: Giovanni Dicanio on 8 May 2008 12:41 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
From: Giovanni Dicanio on 8 May 2008 12:44 "Alf P. Steinbach" <alfps(a)start.no> ha scritto nel messaggio news:1Nednae6A8SItr7VnZ2dnUVZ_j2dnZ2d(a)comnet... > Yes, <url: http://www.google.no/search?q=mark+twain+spelling>. :-) Thanks to your suggestion: http://www.physics.uwo.ca/~harwood/humor13.txt ....Fantastic! :) Giovanni
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: CodeGear is sold Next: Language change is not retained on language bar in mfc application |