Le 05/03/2014 23:40, Jorgen Grahn a écrit :
If you care to follow this thread, all started with the c++ people
badmouthing C, what here is (of course) nothing new since c++ started.
It is worth noting that this is a C++ newsgroup - people here mostly
choose to use C++ rather than C because they think it is a better
language for their use. So it is not particularly surprising to find a
discussion here about why the C++ way is better than the C way. You'll
find the opposite in comp.lang.c.
Of course it is always reasonable to have a discussion about different
ways to solve problems, or different programming techniques and styles.
printf and <iostream> have their pros and cons, and comparison and
dialogue helps both language users and language designers.
What Jorgen was talking about was the inordinate effort that some people
- such as the C++ FQA author - seem to spend in complaining about C++.
No one minds a discussion about a C++ feature that is controversial or
that you don't particularly like, but it is hard to understand why
someone would spend countless hours on an obsessive site like the FQA.
Of course, some of the points raised in the FQA are valid - and some of
those have been addressed in C++11. But many points are just a hate
campaign against C++, and that helps no one.
I complained about people always telling that C"c is horrible" etc. I
took exception against an assertion that "printf" was "one of the worst
designs ever".
Of course bad mouthing c is OK for you.
I just said that:
1) C++ output formatting design is based on a wrong design decision:
operator overloading.
That's opinion, not fact. So yes, expressing your opinion as though it
were an indisputable fact /is/ arguably badmouthing, and it makes it
hard to have a balanced discussion.
2) This leads to overly verbose and inflexible code.
Again, that's opinion and not fact.
That is "badmouthing c++"?
ANY critique of this thing is forbidden or what?
Critique is fine. It is fine to say "I think printf is better
because...". It is fine to say "I find <iostream> formatting to be ugly
and inflexible". It is fine to say "printf is a better choice in cases
such as...". It is also fine to say "C++ formatting would be better if
done like this..."
But saying "C++ output formatting design is based on a wrong design
decision", using "proof by repetition" as your justification, is not
constructive.
I have read enough of your posts to know that you have a lot of very
interesting ideas and opinions about C and C++, and your own variant of
"enhanced C". But I think we can get more discussion and less conflict
if you are a bit more open-minded, and accept that other people have
different opinions and different needs.
/Everyone/ who knows C++ has opinions about things that are "wrong" in
the language - it's such a big language (and library) that this is
inevitable. And the C++ language designers know this too - there are
lots of things that they would have done differently had they known what
they know now. Sometimes it is too late to change things, sometimes the
changes can be made in newer standards. But if the C++ language
designers picked a particular solution for a problem in hand (such as
output formatting), and you disagree with their design, isn't it a bit
presumptuous for you to declare that /you/ are right and all the people
behind C++ are wrong?
David