EmbeddedRelated.com
Forums

Attention: European C/C++/C#/Java Programmers-Call for Input

Started by Paul K. McKneely January 27, 2009
In article <8p61o4d2op9fpkdfcq7f6mu1q7niap6cnn@4ax.com>, keinanen@sci.fi=20
says...
> On Tue, 27 Jan 2009 16:12:23 +0100, "Boudewijn Dijkstra" > <boudewijn@indes.com> wrote: >=20 > >As far as I'm concerned, English is the only language that should be see=
n =20
> >in source code elements (except maybe string literals). It is the =20 > >language of choice for technical terms, the language from which =20 > >programming languages derive their syntax, and overall the best known =
=20
> >language amongst programmers worldwide. English is one of the few =20 > >languages without accents and with relatively short words, thus allowing=
=20
> >relatively efficient typing. >=20 > OTOH, if the program refers for instance to an external record dealing > with some purely national entities (such as defined by the national > legislation), should the programmer invent some unofficial English > translation for these entities or use the name without accented > characters ?
NO legislation dictates what the PROGRAM calls a record or even a field of it. the legislation may well dictate the MEANING of the data and=20 rarely the format (Social Security number, Zip/Post Code). The=20 legislation will dictate how the data is used and type of data, how the data is presented (screen or print). As far as legislation is concerned records called A,B,C have as much=20 significance as 305787, 298770, 16398698... Legislation may dictate the meaning and contents as how many official languages and format etc.. =20
> However, at least in Finnish, doing the =E4=3D>a and =F6 =3D>o translatio=
n
> might end up into an other word with completely different meaning. In > the worst case, two identifier in the same record might end up into > the same US-ASCII representation.
Which is to do with processing of the data, not how the program is coded. Even legislation on how the maths is done does not dictate how the code and its variables etc. are typed in. --=20 Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate
Paul Keinanen wrote:
> On Tue, 27 Jan 2009 16:12:23 +0100, "Boudewijn Dijkstra" >>As far as I'm concerned, English is the only language that should be seen >>in source code elements (except maybe string literals). It is the >>language of choice for technical terms, the language from which >>programming languages derive their syntax, and overall the best known >>language amongst programmers worldwide. English is one of the few >>languages without accents and with relatively short words, thus allowing >>relatively efficient typing. > > OTOH, if the program refers for instance to an external record dealing > with some purely national entities (such as defined by the national > legislation), should the programmer invent some unofficial English > translation for these entities or use the name without accented > characters ?
Why not? Add a comment in your national language, describing the mapping. However, I must admit that terms defined by national legislation are rare in my day work. This is comp.arch.embedded, not comp.software.income-tax-forms. If I have to implement "law X says my device may not do Y", I put that in a comment. "law X" ist not a first-class object in my code.
> IMHO, as a former Fortran programmer, 6 bit characters and 6 > characters identifiers should be enough :-) :-)
A former Commodore BASIC programmer will tell you that 2-character identifiers are enough, too :-) Stefan
>> (such as those with accents, diaeresis, cedilla etc). >> For efficiency, a 254-character subset of them are >> going to be used in creating a character space >> that encodes them into a single byte. > > Like ISO8859? > http://www.unicode.org/Public/MAPPINGS/ISO8859/
No. Not like that. I see 64 control characters and lots of other non-alphanumerics in there.
Stefan Reuther wrote:
> David Brown wrote: >> Paul K. McKneely wrote: >>> What I had in mind is more like ?=3.1415926; > > Funny that even today's software cannot post a correct &pi;. >
It's no problem for Thunderbird, but it seems to be a challenge for Paul McKneely's Outhouse Express. No doubt along with their proprietary character set compiler, and their own editor, they will be writing their own newsreader and email client to work with their character set. No one would ever use such incompatible tools, of course, but it will keep their programmers busy.
>>> The English speaking world has used a lot of >>> Greek letters for variables during that past >>> few centuries. It wouldn't be much of a >>> shock for programmers to suddenly be >>> able to use ? instead of pi. >> There are times when non-English identifiers such as pi, or the Greek >> lower-case letters, could be useful. But they are few and far between, >> mostly restricted to mathematical programming. > > Mathematicians use greek letters and funny fonts because they don't have > multi-character identifiers. When they write "&alpha;", they usually mean > "angle". I actually consider it an advantage to be able to write "angle" > in my programs. >
Actually, mathematicians use funny fonts because they write with a pencil, avoiding any encoding issues. When writing on a computer, they *do* have multi-character identifiers - they write \pi\ and \alpha.
> &pi; might be an exception because it's so prominently known, but it's > nothing I would design my language around. Especially in embedded/DSP > contexts, trig functions often have a period of, say, 64, not 2&pi; :-) >
And even if you really want 2&pi;, you pre-calculate it and store it as a constant called "twoPi" :-)
Paul K. McKneely wrote:
> Hi Falk, > > I actually read the Arabic correctly. It was somewhere in > the reply step where it was changed. Thank you for > being polite. Boudewijn Dijkstra is wrong in his > implication that all Europeans are rude jerks. > I remember someone saying one time: "Be polite > and considerate. You never know who might end > up being your boss." > > Paul >
Please don't top-post - you'll wake the sleeping net-nannies. Boudewijn did not imply that Europeans are "rude jerks" - *you* inferred it from his first reply. You came to this newsgroup asking opinions about inventing a new character encoding to allow European programmers to use native language identifiers in a new programming language. Now you've heard those opinions - it's an amazingly stupid idea. Whoever thought of it clearly has no clue about European languages or their alphabets, no clue as to how Europeans write their code, and has apparently never thought to actually *ask* European if they would want such a "feature".
> Now you've heard those opinions - it's an amazingly stupid idea. Whoever > thought of it clearly has no clue about European languages or their > alphabets, no clue as to how Europeans write their code, and has > apparently never thought to actually *ask* European if they would want > such a "feature".
I said right up front that I am an American who wants to have some feedback from Europeans because I don't have full appreciation for what you just said above. That is why I posted in the first place. Now why so many of you get so angry because I ask for your opinions, and then you turn around and claim that I am so thoughtless as to never ask for you opinions. Duhhhh! Illustration: Boy: Daddy. Can I please have a drink of water? Man: Why don't you ever ask before you get a drink of water you stupid Boy! as "Boudewijn Dijkstra" <boudewijn@indes.com> wrote in message news:op.uoe8ixqyy6p7a2@azrael.lan...
> Like Java does? > http://java.sun.com/docs/books/jls/third_edition/html/lexical.html
So what did Europeans think about this "incredibly stupid idea"? Or did the Java development team forget to ask any Europeans if they even wanted it? But seriously. I gave up trying to please others. I just try to please myself. I am putting those little extras in there for when I want to use them. In my way of thinking, those "funny looking European characters" are for extending English for those who speak English. The language has adopted a very large number of foreign words and I am regularly corrected by those who primarily speak English on how to properly pronounce them. If I should pronounce them properly when used in an English sentence, then why shouldn't I spell them properly too? But let me ask you a question if you are willing to honestly answer it. Are you angry at me because I am an American? Do you feel that Americans cram their ideas down your throat and you have little to say about it? I really would like to know. Because if the answer is "Yes", I am inclined to simpathize with you because they do that to me too.
In article <KpNfl.14764$YU2.882@nlpi066.nbdc.sbc.com>,
Paul K. McKneely <pkmckneely@sbcglobal.net> wrote:
[...]
>It wouldn't be much of a shock for programmers to suddenly be able >to use [Greek letter pi] instead of pi.
As you can in Ada? <http://www.adaic.com/standards/05rm/html/RM-A-5.html> About the character set usable in Ada, see the following section in the Ada 2005 Reference Manual <http://www.adaic.com/standards/05rm/html/RM-2-1.html> and the corresponding section in the Ada 2005 Rationale <http://www.adaic.com/standards/05rat/html/Rat-7-5.html>. Hope this helps, Dirk Dirk.Craeynest@cs.kuleuven.be (for Ada-Belgium/-Europe/SIGAda/WG9 mail)
Paul K. McKneely schrieb:
...
> So what did Europeans think about this "incredibly stupid idea"? > Or did the Java development team forget to ask any Europeans > if they even wanted it?
Probably they asked "WEB-designers".
> Are you angry at me because I am an American?
I don't see anyone angry here. And there are so many nations in Europe, that we can easily pick on each other.
> Do you feel that Americans cram their ideas down your > throat and you have little to say about it?
We have established a European government to do that job ;-) Falk P.S.: ASCII is OK
Paul K. McKneely wrote:
>> Now you've heard those opinions - it's an amazingly stupid idea. Whoever >> thought of it clearly has no clue about European languages or their >> alphabets, no clue as to how Europeans write their code, and has >> apparently never thought to actually *ask* European if they would want >> such a "feature". > > I said right up front that I am an American who wants to have some > feedback from Europeans because I don't have full appreciation > for what you just said above. That is why I posted in the first place. > Now why so many of you get so angry because I ask for your opinions, > and then you turn around and claim that I am so thoughtless as to never > ask for you opinions. Duhhhh! > > Illustration: > Boy: Daddy. Can I please have a drink of water? > Man: Why don't you ever ask before you get a drink of water you stupid Boy! >
I know you are American, but you *do* understand English, don't you? No one is angry or annoyed - I don't think anyone but you has posted an angry or directly rude post. Perhaps you are unaware of how British English speakers (and many other Europeans when speaking or writing in English) use things like sarcasm and understatement for emphasis. I too can give illustrations: Boy: Daddy, I'm thirsty, so I'm going to have a sandwich. Do you think the sandwich would be best with potato or with cabbage? Man: If you're thirsty, have a drink. Try water or milk. Boy: Why are you getting so angry at me?
> as "Boudewijn Dijkstra" <boudewijn@indes.com> wrote in message > news:op.uoe8ixqyy6p7a2@azrael.lan... >> Like Java does? >> http://java.sun.com/docs/books/jls/third_edition/html/lexical.html > > So what did Europeans think about this "incredibly stupid idea"? > Or did the Java development team forget to ask any Europeans > if they even wanted it? >
Did you miss the key point? *UNICODE*. They very specifically choose a *standard* for their encodings, not something incompatible and proprietary. In particular, it's very useful to be able to write comments and strings in Unicode - many modern languages allow it. If you had suggested using Unicode, or Latin-1, or listened to the idea when it was suggested, then you'd have got far more support - it's the idea of have a proprietary half-baked encoding that is incompatible with every other tool that is "incredibly stupid". Allowing non-ASCII identifiers is a waste of time for European programmers. It may be of interest to those with more significantly different languages and writing, such as Arabic speakers or Far Eastern programmers, but I seriously doubt it. If your tools are expected to work with other compiler tools (such as using existing linkers or archivers, linking with output of other compilers, debugging, etc.), then allowing non-ASCII identifiers will lead to chaos. Sun can get away with it for Java because they don't need such interaction, so once they allowed Unicode for strings and comments, it cost them virtually nothing to allow it for identifiers. Being Unicode, they don't need to worry about other tools such as editors.
> But seriously. I gave up trying to please others. I just try to please > myself. I am putting those little extras in there for when I want to > use them. In my way of thinking, those "funny looking European > characters" are for extending English for those who speak English. > The language has adopted a very large number of foreign words > and I am regularly corrected by those who primarily speak English > on how to properly pronounce them. If I should pronounce them > properly when used in an English sentence, then why shouldn't > I spell them properly too? >
So now you are developing an entirely new programming language for your own benefit, and you are inventing a new character encoding just so that you can use variable names like "na&#4294967295;ve" ?
> But let me ask you a question if you are willing to honestly > answer it. Are you angry at me because I am an American? > Do you feel that Americans cram their ideas down your > throat and you have little to say about it? I really would like > to know. Because if the answer is "Yes", I am inclined to > simpathize with you because they do that to me too. >
I am *not* angry with you. I am somewhat frustrated that you have started out with a pre-conceived idea, asked opinions on your implementation of the idea, and can't seem to grasp that it was a terrible idea in the first place. The idea of your having decided in advance what you think is best for other people without having asked them, particularly in reference to people from other countries, is certainly stereotypical American. But I try not to give much credit to stereotyping unless it is thrust upon me. I certainly won't blame you for being American!
Op Wed, 28 Jan 2009 19:14:12 +0100 schreef Stefan Reuther  
<stefan.news@arcor.de>:
> David Brown wrote: >> Paul K. McKneely wrote: >>> What I had in mind is more like ?=3.1415926; > > Funny that even today's software cannot post a correct &pi;.
Most ones can. Even Outlook Express, but some configuration is required, IIRC. -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/