 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Dave Moore Guest
|
Posted: Tue May 04, 2004 10:34 am Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
David Abrahams <dave (AT) boost-consulting (DOT) com> wrote
| Quote: | llewelly <llewelly.at (AT) xmission (DOT) dot.com> writes:
if (!firstTime) ...
vs.
if (not firstTime) ...
I find it hard to believe a surprised C++ programmer will
misinterpret the meaning of 'and', 'or', or 'not' . All the C++
(and C) programmers I have known pronouce '&&' as 'and', '||' as
'or', and most pronouce '!' as 'not'.
When I first saw it (only a few years ago!) I thought it was a syntax
error. IMO, writing
a and b
where you could write
a && b
is roughly equivalent to writing
operator*(a, b)
where you could write
a * b
Sure, it's legal, but it obfuscates the intended meaning.
|
I agree that the second case is obfuscatory, but I find it strange
that you consider the first one obfuscatory as well .. it seems like
'plain logic' to me. I would say that it does not obfuscate at all,
because the author intended to compare objects a and b with the
boolean 'and' operation. It is just that we have learned over time
that '&&' is synonymous with 'and'. I think that for this reason, the
boolean operators are a special case, and adding them as keywords to
the language is a 'good thing'.
As for the other 'alternate tokens', I think the problem stems from
the (arbitrary) restriction of "one extra token per symbol". Why not
also reserve something more meaningful like 'C++_ref' as a synonym for
&, so that people with non-US keyboards don't have to type 'bitand'
when they want to take the reference of something. The 'C++_' (or
even Cpp) prefix should virtually eliminate the problem of breaking
existing code. You could then also allow "C++_destr" as well as
"compl" as substitutes for '~'.
Now, as for the issue of who "should be allowed to" use such
replacements ... that seems like it should be handled on a
per-location basis using internal style-guides. Clearly, reading code
using alternative tokens is not going to be easy for those used to the
conventional syntax, but as long as we have to live with them, why not
make life easier rather than harder?
Just my two pfennig.
Dave Moore
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
kanze@gabi-soft.fr Guest
|
Posted: Tue May 04, 2004 10:35 am Post subject: Re: AND, NOT, OR keywords |
|
|
Andrea Griffini <agriff (AT) tin (DOT) it> wrote
| Quote: | On 27 Apr 2004 20:41:58 -0400, [email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
I'm an Italian, but my keyboard is american and has no accented
letters;
Is it a PC? How much extra did you have to pay for this feature?
And what happens when you type documentation or comments, in
Italian?
I'm actually using the same keyboard I was using several years ago,
with an adapter to adjust the connector type. The same keyboard is
also used for two PCs (a Windows and a Linux) using a
keyboard/mouse/video multiplexer.
I've to admit that it's difficult to find PCs in italy with an US
keyboard; looks like italians are not considered as potential
programmers (it's hard to type "{") or internet citizens, for that
matter (it's hard to type "@" or "~" too, with no standard for it).
|
Most PC sales outlets are NOT geared to programmers. When you order a
Sparc from Sun France, you get a list of keyboards, and you choose
one -- there is no default choice. And all of the Sparcs I've seen have
US keyboards. Including those not used for program development! But
it's been years (15? 20?) since I've seen a PC with anything but a local
keyboard.
And as you say, problem isn't only that you need AltGr, it's also that
the key position varies from one keyboard to the next, so you really
can't learn it.
| Quote: | About the comments in italy we've indeed probably much
less problems than other countries: the "important"
accent you've to type is just on the last letter and
for that the single quote will do fine enough.
For the last letter there are actually two different
possible accents, but I think most italians don't
actually know where should go one and where the other,
so just the single quote or backquote is ok.
|
German also has alternative spellings, ae for ä, etc. But they are just
that -- they look horrible, and while I wouldn't hesitate for comments
(supposing I didn't have a choice), I wouldn't consider it for external
documentation. On the other hand, French without accents is practically
unreadable, especially when you start using elliptical phrases as is so
often in comments. (For most verbs, only an accent distinguishes
between the present indicative and the past participle -- whether you
are doing something, or it is being done to you.)
Comments are a special case anyway. You don't want to format comments
the same way you format your actual source code. When entering
comments, I rather want the iso-accents-mode and line wrap (since in
Emacs or VIM, line wrap is intelligent enough to prefix the new line
with //) -- most of the time, in fact, I'll be piping the results
through an external program to format them, and don't want any fancy
indenting from the editor. So I use a different mode for comments than
for code.
| Quote: | In my view, however, it would be much better to push the use of
english for IT instead of incorporating the native language
differences. Focusing on those differences is IMO not an help for the
community in general. It's working toward splitting instead than
toward joining.
|
Expecting people not in regular contact with native English speakers to
speak or write understandable English is unrealistic. Even those in
regular contact generally write English slower than there native
language. The usual results of requiring all comments to be in English
is a dramatic reduction in the ammount of commenting.
| Quote: | I've learned to type without looking at the keyboard, simply because
it is impossible to use Unix or to write C code using native
keyboards. And it is impossible to write documentation in the local
language using a US keyboard.
Now the (admittely small quantity) of documentation I
write is either plain ASCII not using accented letters
(but as I said we in italy are lucky in this respect)
or is written in ASCII using TeX. I also write sometimes
using "US-international" layout, that allows me to enter
an accented letter by pressing ctrl-accent first and
the letter after.
|
You're lucky. Most places I've worked have a policy that the
documentation must be in MS-Word. Once or twice, I've gotten away with
being "innovative", and writing it in HTML (using emacs or VIM). But
even then, if I'm typing a large block of French or German, I'll switch
the the French or the German keyboard -- I can type more quickly using
the native keyboard, because there is nothing special to do to get the
characters I need.
| Quote: | I've never gotten beyond the
interview stage in Italy, but the technical discussions
have always been in Italian, so I don't imagine that
the situation would be that much different there:
international projects in English, local projects in
the local language.
I've to say I'm surprised there is any software project
in italy: here the word programmer is basically an
insult. Programming is seen as an activity that should
be carried just for a few years, after which you get
to do other things, leaving programming to newcomers.
Here "senior programmer" is almost an oxymoron; this is
just my personal impression, of course.
|
That would explain the rates I ended up being offered, which in turn
explains why I never ended up taking a job in Italy:-).
I know the feeling; it used to be that way in France as well.
"Technical" work is considered somehow demeening. But the situation
seems to be improving greatly, and there have always been exceptions:
Olivetti, back in their heyday, or Solari, where they never failed to
address me as "Signore ingeniere". (But they are in Udine, and in the
eastern Alps, be it Bavaria, Austria, or Friuli/Alto-Adige/Trentino,
titles are everything).
| Quote: | The new "keywords" really don't help that much. The most difficult
characters are { and }, and there's no getting away from these
(unless you can read trigraphs).
My idea is just that supporting diversity in this
field was a bad service for the community. Made the
things more complex for solving the wrong problem
(how to enter source in a system that doesn't
support ASCII). It focused on a pointless detail
that I would indeed like to see disappearing (it's
just an hopeless dream, of course).
|
I don't know. Had the problem been addressed from the start, if for
example, Kernighan and Richie had refused to use any character which
wasn't in the invariant part of ISO 646, I think it would have been a
good thing. I've had to develop C on terminal which only supported ISO
646-DE. As it is, by the time trigraphs finally got standardized, there
was no more need for them at the encoding and the display level. And of
course, trigraphs and alternative tokens are only hacks, patchs which
sort of try and avoid the most obvious symptoms, without really
addressing the basic problem.
In the mean time, Windows and Linux KDE allow managing the keyboard
layout on a per Window basis, and for Open Desktops (Solaris, HP/UX,
AIX), xmodmap can be used to change it globally, and you can easily set
up menu entries and hot keys to invoke it. And anyone capable of
mastering all of the subtilities of C++ should be able to learn two
different keyboards.
--
James Kanze GABI Software mailto:kanze (AT) gabi-soft (DOT) fr
Conseils en informatique orientée objet/ http://www.gabi-soft.fr
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Andrea Griffini Guest
|
Posted: Tue May 04, 2004 5:35 pm Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
On 3 May 2004 22:09:32 -0400, [email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
| Quote: | When trigraphs were first proposed, I was working in Germany, and using
Ä and Ü to index arrays. That was a long time ago, however, and by the
time they were finally formally adopted, I think the problem they were
designed to solve had more or less ceased to exist.
|
Exactly what I mean. It was a solution for a nonexistent problem.
May be it was perceived as a problem a few years ago, but going
after it was the wrong move; IMO a wrong move especially from a
philosophical point of view (go after meaningless diversity that
deserves to disappear).
.....
| Quote: | In the meantime, the rule of least surprise rules. Just use whatever
the existing code uses.
|
And that makes alternative tokens basically a taboo.
You must study them, because someone may use them
or because you may be tempted (how fool) to have a
variable named "compl".
But you should avoid using them, because they offer
no concrete advantage and the vast majority of
programmers don't know about them.
It's just another broken window of the anyway great
C++ construction.
Andrea
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Andrea Griffini Guest
|
Posted: Tue May 04, 2004 5:37 pm Post subject: Re: AND, NOT, OR keywords |
|
|
On 2 May 2004 11:51:17 -0400, Francis Glassborow
<francis (AT) robinton (DOT) demon.co.uk> wrote:
| Quote: | You may think the argument is weak but nonetheless that is exactly why
they are there. C and C++ use a number of symbols that are not part of
the ISO646 character set and back in the early 90s that was an important
issue, most particularly to various Nordic countries who actually
participate(d) in the development of both C and C++ (it would be nice if
Italy got involved).
|
That was my main suspect. They were added because of
"political" reasons inside the committee. The true
technical validity of an issue is IMO just one of the
many factors in reunions.
I've even seen points approved just because they came
from a partecipant that didn't say anything else, and
it was considered rude to not allow to leave a mark
on the results of the reunion.
I suppose that the more "official" the reunion gets,
then the worse is this non-technical noise.
Having Italy also present would have made the damage
worse, in my opinion; the C++ standard would had to
"pay" a little to Italy too. And IMO you can substitute
"Italy" with any country you like.
Having italian partecipants that didn't focus on the
fact they were italian (a totally irrelevant aspect)
is of course a different thing.
| Quote: | But they are there and have been part of the C++ spec for more than a
decade. They are certainly a much better solution to the problem than
the horrible trigraph fix (which is so bad that many compilers need
explicit switches to make them visible)
|
This water passed under the bridge long ago, but IMO
that "nice" solution was solving the wrong problem.
You (they) were discussing about what's the best pump
to get the water out while IMO the discussion should
have been in trying not to get the water in.
If you have a system that has a problem with ASCII
then you should fix the system; that will give much
more benefits than just to C++.
A solution that others choose was indeed just totally
ignoring the issue... and this IMO was better.
It's however true that at that time the globalizing
power of the internet was not yet perceived.
Andrea
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Ian McCulloch Guest
|
Posted: Tue May 04, 2004 8:17 pm Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
[...]
| Quote: | If I were designing a language from scratch, it wouldn't use any symbols
outside of the invariant part of ISO 646. And keywords would be in
caps, to stand out. But that language wouldn't be C++. In C++, logical
and is &&. Anyone learning C++ must be able to deal with it. And
having two ways to write it just adds to the confusion.
|
THERE IS AN OLD JOKE, THAT THE ONLY PEOPLE THAT QUICKLY PARSE LONG STRINGS
WRITTEN IN ALL-CAPITALS ARE OLD FORTRAN PROGRAMMERS. NOWDAYS IT IS
*REALLY* OLD FORTRAN PROGRAMMERS, BECAUSE FORTRAN HAS ALLOWED lowercase
KEYWORDS FOR A LONG TIME NOW AND THEY ARE MUCH EASIER TO READ.
Doesn't your editor have syntax highlighting?
;)
Cheers,
Ian McCulloch
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Francis Glassborow Guest
|
Posted: Tue May 04, 2004 8:21 pm Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
In message <d6652001.0405030338.6b081d58 (AT) posting (DOT) google.com>,
[email]kanze (AT) gabi-soft (DOT) fr[/email] writes
| Quote: | If I were designing a language from scratch, it wouldn't use any symbols
outside of the invariant part of ISO 646. And keywords would be in
caps, to stand out. But that language wouldn't be C++. In C++, logical
and is &&. Anyone learning C++ must be able to deal with it. And
having two ways to write it just adds to the confusion.
|
And here you appear to continue to confuse 'learning C++' with 'learning
to program.' I would be very happy with 'always use symbols' were it not
for the fact that I have seen a great number of bugs in code written by
post-novices that results from confusing bitwise and logical operators.
In addition, we have a continuing problem in that the failure rate for
those attempting to learn programming is disgraceful. It is just not
acceptable to say 'Programming is hard and requires dedication and
skills that most people lack.' No you did not say that but it is all to
common a response to the failure rate.
Another approach which I also reject is that of completely trivialising
the programs that novices are asked to write. It is like trying to teach
adults to read using books designed for young children. Yes, I am
somewhat individualistic (and arrogant:-) but keeping very clear
differences between easily confused concepts is very important when
teaching newcomers. When they have a firm grasp of the fundamentals,
polish can be added. For novices I always write:
int i(0);
rather than
int i = 0;
because it avoids the problem of the context overloading of the '='
sign. Until they are fluent and understand the difference between
assignment and initialisation I want the greatest possible syntactic
difference in expressing the concepts.
In the same way, until they are confident of the difference between &
and && I want the greatest possible separation. Experienced programmers
rarely confuse the two (though we have to watch what we type because
sticky keyboards -- all too common -- can convert an intended && to &,
and keybounce -- uncommon these days -- can convert & to &&.). However
for novices it is all strange and every bit of help they can get in
seeing the wood for the trees is essential.
--
Francis Glassborow ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Jeff Schwab Guest
|
Posted: Tue May 04, 2004 8:21 pm Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
David Abrahams wrote:
| Quote: | llewelly <llewelly.at (AT) xmission (DOT) dot.com> writes:
David Abrahams <dave (AT) boost-consulting (DOT) com> writes:
llewelly <llewelly.at (AT) xmission (DOT) dot.com> writes:
if (!firstTime) ...
vs.
if (not firstTime) ...
I find it hard to believe a surprised C++ programmer will
misinterpret the meaning of 'and', 'or', or 'not' . All the C++
(and C) programmers I have known pronouce '&&' as 'and', '||' as
'or', and most pronouce '!' as 'not'.
When I first saw it (only a few years ago!) I thought it was a syntax
error.
[snip]
Sure, I can believe you thought it was a syntax error, but did you
have any doubt as to its meaning once you saw it compile?
I never saw it compile, and if I did I still would've been confused.
Does "and" mean "&&" or "&"? I know the answer, but that doesn't
make it obvious.
|
Are you suggesting that C++ programmers 'round the world should limit
themselves to the subset of the language you already know? God forbid
you should have to pick up a reference book.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
John Kewley Guest
|
Posted: Tue May 04, 2004 8:27 pm Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
I use "&&" regularly and am occasionally tempted to use "and", but as David
A states, would the
reader interpret "and" as "&" or as "&&" ("andand"?). Certainly to many
firmware guys, "and" and "or" would
naturally mean "&" and "|".
I suspect that nearly all programs use "&&" somewhere whereas a smaller %age
will use "&", so
experienced developers will by default use "&&" and not use "&" by mistake
(v. diff for newbies of course!).
This reminds me of my analysis of a a famous quote:
Hamlet: "To be or not to be, that is the question"
Firmware Developer: "0x2b | ~0x2b, answer is -1"
Software Developer: "0x2b || !0x2b, answer is -1"
Logician: "Tautology, therefore True"
JK
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Stefan Heinzmann Guest
|
Posted: Tue May 04, 2004 8:28 pm Post subject: Re: AND, NOT, OR keywords |
|
|
[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
| Quote: | Andrea Griffini <agriff (AT) tin (DOT) it> wrote in message
news:<vtqm801ftui16bunqpmavl31cc3j0vnedi (AT) 4ax (DOT) com>...
On 24 Apr 2004 22:08:12 -0400, Alexei Polkhanov
[email]apolkhanov (AT) novus-tele (DOT) net[/email]> wrote:
Now go and replace all 'and' by '&&', because alternative tokens were
designed to help people who live outside US and UK like in Norvegia
perhaps, whose languages have special characters which happen to
clash with symbols like '{}'.
I wonder if it has been estimated how much damage
has been done to the C++ language just because the
inventor was not an american and thought this was
a very important thing instead of a pointless detail.
I don't know whether this particular detail originated in C or in C++,
but it was part of the techical addendum or whatever for C, before C++
was standardized. The difference is that in C, you need to include a
special header file to activate them.
|
Wherever it originated it shouldn't have been a programming language's
business to solve it. If a programming language requires a certain set
of characters it is the environment that has to make sure they are
available. How else could you have a standard conforming compiler on
such an environment?
If certain characters aren't easy to type on certain keyboards it is the
business of the editing system to provide appropriate workarounds, such
as key combinations that get converted on entry to the right symbol. It
would have been ok to /type/ a trigraph if the translation happens while
you type and the proper substitution appears in the source. But such
substitutions should have been out of scope for the language definition.
[...]
| Quote: | I'm an Italian, but my keyboard is american and has
no accented letters;
Is it a PC? How much extra did you have to pay for this feature? And
what happens when you type documentation or comments, in Italian?
I've learned to type without looking at the keyboard, simply because it
is impossible to use Unix or to write C code using native keyboards.
And it is impossible to write documentation in the local language using
a US keyboard.
and I think that for writing
code this is the most intelligent solution.
It's about the only solution that works, unless you want carpal tunnel
syndrome. For most Unix machines, I think you can chose a US keyboard,
and for PC's (including under Linux), you can load whatever driver you
want, so if you don't mind having different characters on the keys than
what actually gets entered...
Still, it would have been a lot simpler to begin with if they had
limited the character set to the invariant part of ISO 646.
|
I resolved to use an apparently little-known keyboard mode under Windows
called "US-international". The keyboard layout is the ordinary US layout
and hence quite well suited for C++ programming, but the right Alt key
works like the AltGr key on other keyboards in thet you can use it to
enter various special accented characters from several languages. In
addition, the accent characters themselves are dead and combine with
some letters to form the same accented letters.
This is the ideal combination for me, because it allows writing
documents in various languages based on the roman alphabet without
switching the keyboard layout (and trying to remember where the # is
located now). Everybody with a command of several languages probably has
this problem. You are fluent in both French and German, didn't you come
across the same problem that you had to switch keyboard layouts
depending on the language you were typing?
I even went as far as defining my own keyboard layout under X that tried
to mirror the US-international Windows layout as far as possible,
because I liked it so much.
But the bottomline is this: Character substitutions should never have
been a matter for the C/C++ standards, but merely a problem for whatever
text entry tool is used. Hence they shouldn't ever appear in the source
code itself. This applies to trigraphs as well as operator substitutes.
[...]
| Quote: | The new "keywords" really don't help that much. The most difficult
characters are { and }, and there's no getting away from these (unless
you can read trigraphs).
|
I think the and/or/... keywords are a bad idea because they occur in the
normal flow of text in the source code and thus do not stand out if you
look at the text. You'd need syntax coloring for that. The ordinary
keywords are typically surrounded by enough punctuation or operator
symbols so that this isn't a problem. Because of this I even have got
problems with that traditional all_lowercase_with_underscore style for
identifiers, because for me it doesn't make it easy enough to separate
out what is a type and what isn't. For this reason I much prefer the
style where types start with uppercase characters, macros are
all-uppercase and the rest starts with lowercase characters (including
namespaces). This gives some optical structure to the source code that
C/C++ itself is missing IMHO. The and/or/... extra keywords just make
this worse, therefore I'd hate to see them being used more frequently.
--
Cheers
Stefan
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
llewelly Guest
|
Posted: Wed May 05, 2004 10:36 am Post subject: Re: AND, NOT, OR keywords |
|
|
Andrea Griffini <agriff (AT) tin (DOT) it> writes:
[snip]
| Quote: | A solution that others choose was indeed just totally
ignoring the issue... and this IMO was better.
[snip] |
On this note, I would like to know if anyone knows of any programming
langauges besides C, objC, C++, and objC++ which have any
equivalent of digraphs or alternative tokens. I've been trying to
think of some, and I can't.
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
David Abrahams Guest
|
Posted: Wed May 05, 2004 10:38 am Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
Jeff Schwab <jeffplus (AT) comcast (DOT) net> writes:
| Quote: | I never saw it compile, and if I did I still would've been confused.
Does "and" mean "&&" or "&"? I know the answer, but that doesn't
make it obvious.
Are you suggesting that C++ programmers 'round the world should limit
themselves to the subset of the language you already know? God forbid
you should have to pick up a reference book.
|
Yeah, it's funny isn't it? Even though I've been on the C++ committee
for several years working on issues in the standard text, to this day
I have managed to avoid ever looking at any part of it! When people
ask my opinion about a language or library issue I just make something
up based on the subset of the language I already know. Call me
irresponsible, but it works! The standard is so small I could
probably absorb the whole thing in a few minutes anyway.
see-no-evil-hear-no-evil-ly y'rs,
Dave
--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Jeff Schwab Guest
|
Posted: Wed May 05, 2004 10:40 am Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
John Kewley wrote:
| Quote: | Software Developer: "0x2b || !0x2b, answer is -1"
|
#include <iostream>
int main ( )
{
/* Prints "1".
*/
std::cout << (0x2b || !0x2b) << 'n';
}
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Niklas Matthies Guest
|
Posted: Wed May 05, 2004 10:45 am Post subject: Re: AND, NOT, OR keywords |
|
|
On 2004-05-04 10:26, [email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
| Quote: | Niklas Matthies <usenet-nospam (AT) nmhq (DOT) net> wrote:
On 2004-04-28 00:41, [email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
:
And it is impossible to write documentation in the local language
using a US keyboard.
So I wonder how I manage to do it. :)
You've got understanding management:-).
|
Well, a workplase where I'm not allowed to use my own keyboard is
something that I would avoid like the plague. I guess I _am_ lucky
that my current employer even insisted on paying for my keyboard.
:
| Quote: | But quite a few companies where I've been have insisted that the
documentation be in MS-Word, and have given me a PC with a local
keyboard to write it on. I don't know about AllChars, or whatever,
|
AllChars (google for it) maps single presses of the Ctrl key to what
the "Compose" key does under X-Windows and what Ctrl-K does under Vim,
which gets especially comfortable when you remap the Caps Lock key to
Ctrl.
:
| Quote: | And using a French keyboard is easier than using any of the compose
key packages to write French. Why make life hard for yourself.
|
It's a matter of personal preference, I suppose. I don't see why I
should make my life hard by typing C++ code on a local keyboard (which
hurts my hands), whereas I don't perceive typing non-ASCII characters
using a sequence of key presses as too much of a bother.
Anyway, my bottom line is what is often said in other contexts in this
group: Use the right tool for the job. And the right tool for typing
C++ (and a great many of other programming languages) is a keyboard
with US layout. Restricting the character set of a language to the
invariant set of ISO 646 would be the wrong solution and would hurt
everyone, in my opinion.
-- Niklas Matthies
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Gerhard Menzl Guest
|
Posted: Wed May 05, 2004 10:51 am Post subject: Re: AND, NOT, OR keywords |
|
|
[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
| Quote: | Andrea Griffini <agriff (AT) tin (DOT) it> wrote
|
[...]
| Quote: | In my view, however, it would be much better to push the use of
english for IT instead of incorporating the native language
differences. Focusing on those differences is IMO not an help for the
community in general. It's working toward splitting instead than
toward joining.
Expecting people not in regular contact with native English speakers to
speak or write understandable English is unrealistic. Even those in
regular contact generally write English slower than there native
language. The usual results of requiring all comments to be in English
is a dramatic reduction in the ammount of commenting.
|
This is very much an issue of varying mileage. Personally, I find it
much harder to talk or write about C++ topics (or software engineering
topics in general) in my native language than in English. Most German
C++ articles appear like unintelligible gibberish to me ("Vorlagen? What
the ... gosh, they must be talking templates!"). Apart from the
occasional problem domain related term, I have never used anything but
English in code and comments.
As much as a despise any cultural hegemony, I think software engineering
is too specialized a field to support regional fragmenting. A reasonable
mastering of English is a sine qua non in the natural sciences, and I
don't see why global cooperation should be hindered by insisting on
localized terminology. There would still be sufficient traffic in this
newsgroup if it were exclusively frequented by Americans, Britons and
the odd Australian or New Zealander, but I think it would be deprived of
valuable input.
Gerhard Menzl
--
Humans may reply by replacing the obviously faked part of my e-mail
address with "kapsch".
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
John Kewley Guest
|
Posted: Wed May 05, 2004 7:20 pm Post subject: Re: AND, NOT, OR keywords -- morality vs legality |
|
|
sorry, it should have read:
Software Developer: "0x2b || !0x2b, answer is 1"
(my cut+paste from previous line was overzealous)
But the point of the joke is that it doesn't matter what A is,
(A or not A) is always true! Yet the Software Developer had to write a
program to calculate it.
JK
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
|
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group
|