 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ted Guest
|
Posted: Sat Mar 25, 2006 1:56 am Post subject: C++ Scandal?! |
|
|
Is the complexity of C++ by design? The motive being to artificially
create levels of high cost personnel required to use it and also to ensure
only few can create the tools. The old "job security trick"!
There seems to be signs that the above is true (censorship in the moderated
C++ groups for one). Oh my, it could be a scandal!
Ted
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
James Dennett Guest
|
Posted: Sat Mar 25, 2006 3:06 am Post subject: Re: C++ Scandal?! |
|
|
Ted wrote:
| Quote: | Is the complexity of C++ by design?
|
I'd recommend you read "The Design and Evolution of C++"
to understand where C++'s complexity comes from; in one
sense it's by design, but it's not a design intended to
create complexity, but rather complexity as a side-effect
of necessary evolution.
C++ is a versatile (general purpose) programming language,
supporting multiple paradigms for varying tasks. That,
combined with constraints of strong backwards compatibility
with C, leads to an inevitable level of complexity.
| Quote: | The motive being to artificially
create levels of high cost personnel required to use it and also to ensure
only few can create the tools. The old "job security trick"!
|
Were it so, the language would likely not have been so
widely used, and supported by so many toolchains. There
is no job security in working with, or selling tools for,
a language that is too complex for programmers to use.
I suspect it's pretty hard making money in the tools
market, with so many tools now being available for no
or very little money; affordable tools have contributed
to the success of C++, and competition from other
languages with freely available tools has lead to more
vendors making their C++ tools available at no charge.
| Quote: | There seems to be signs that the above is true (censorship in the moderated
C++ groups for one). Oh my, it could be a scandal!
Ted
|
You may be disappointed to find no scandal; this group, and
probably also comp.lang.c++.moderated, tends to approve any
message which is on-topic and consistent with our charter
and guidelines. If you find that you have posted clear
messages which are topical and don't conflict with our
governing documents and yet they are rejected, you are
free to write to the moderators to ask for an explanation.
Once in a while mistakes are made, though we like to think
that they are rare.
-- James
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
John Nagle Guest
|
Posted: Sat Mar 25, 2006 5:06 am Post subject: Re: C++ Scandal?! |
|
|
James Dennett wrote:
| Quote: | Ted wrote:
Is the complexity of C++ by design?
I'd recommend you read "The Design and Evolution of C++"
to understand where C++'s complexity comes from; in one
sense it's by design, but it's not a design intended to
create complexity, but rather complexity as a side-effect
of necessary evolution.
|
That's a kind assessment. More realistically, there
were some serious design mistakes in the early versions,
and the cruft required to fix them weighs down the language.
We know enough now to do it right, but that will not
happen. The need to run legacy code outweighs the need to
improve the language, especially when there are several
similar, newer languages available.
John Nagle
Animats
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
loufoque Guest
|
Posted: Sat Mar 25, 2006 5:06 am Post subject: Re: C++ Scandal?! |
|
|
Ted wrote :
| Quote: | There seems to be signs that the above is true (censorship in the moderated
C++ groups for one). Oh my, it could be a scandal!
|
Who let this message pass ? ;)
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Bob Hairgrove Guest
|
Posted: Sat Mar 25, 2006 7:06 pm Post subject: Re: C++ Scandal?! |
|
|
On Sat, 25 Mar 2006 04:20:18 GMT, loufoque (AT) remove (DOT) gmail.com (loufoque)
wrote:
| Quote: | Ted wrote :
There seems to be signs that the above is true (censorship in the moderated
C++ groups for one). Oh my, it could be a scandal!
Who let this message pass ?
|
Maybe the moderators wanted to take the wind out of his sails, re:
"censorship".
--
Bob Hairgrove
NoSpamPlease (AT) Home (DOT) com
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Ted Guest
|
Posted: Sun Mar 26, 2006 7:06 pm Post subject: Re: C++ Scandal?! |
|
|
"John Nagle" <nagle (AT) animats (DOT) com> wrote in message news:nP2Vf.47865$2O6.138 (AT) newssvr12 (DOT) news.prodigy.com...
| Quote: | James Dennett wrote:
Ted wrote:
Is the complexity of C++ by design?
I'd recommend you read "The Design and Evolution of C++"
to understand where C++'s complexity comes from; in one
sense it's by design, but it's not a design intended to
create complexity, but rather complexity as a side-effect
of necessary evolution.
That's a kind assessment. More realistically, there
were some serious design mistakes in the early versions,
and the cruft required to fix them weighs down the language.
|
Would you care to list those things that you think are in need of fixing
(the "serious design mistakes")?
| Quote: | We know enough now to do it right, but that will not
happen. The need to run legacy code outweighs the need to
improve the language, especially when there are several
similar, newer languages available.
|
Ted
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
John Nagle Guest
|
Posted: Sun Mar 26, 2006 10:56 pm Post subject: Re: C++ Scandal?! |
|
|
Ted wrote:
| Quote: | "John Nagle" <nagle (AT) animats (DOT) com> wrote in message news:nP2Vf.47865$2O6.138 (AT) newssvr12 (DOT) news.prodigy.com...
James Dennett wrote:
Ted wrote:
Is the complexity of C++ by design?
I'd recommend you read "The Design and Evolution of C++"
to understand where C++'s complexity comes from; in one
sense it's by design, but it's not a design intended to
create complexity, but rather complexity as a side-effect
of necessary evolution.
That's a kind assessment. More realistically, there
were some serious design mistakes in the early versions,
and the cruft required to fix them weighs down the language.
Would you care to list those things that you think are in need of fixing
(the "serious design mistakes")?
|
A few of the legacy problems from early C++:
- References went in late, and many things that should
have been references are pointers. "this", for example.
- With neither generics nor RTTI in early versions, the
concept of unchecked type downcasting became widespread,
and some of it is still around.
- New-style casts went in late, and as a result, old-style
casts, which probably shouldn't have been in C++ at all,
were and are widely used.
All of these problems are fixed in the successors to C++,
so they're recognized defects. But it's too late to fix them
in C++.
There are other well-known problems, but I don't want to rehash them here.
John Nagle
Animats
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Falk Tannhäuser Guest
|
Posted: Mon Mar 27, 2006 4:39 pm Post subject: Re: C++ Scandal?! |
|
|
John Nagle wrote:
| Quote: | A few of the legacy problems from early C++:
- References went in late [...]
- [...] unchecked type downcasting [...]
- New-style casts went in late [...]
|
I would add:
- Instead of 'explicit' keyword we should have had
'implicit' to allow using a constructor for implicit
conversion
Falk
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Tomás Guest
|
Posted: Mon Mar 27, 2006 5:06 pm Post subject: Re: C++ Scandal?! |
|
|
| Quote: | A few of the legacy problems from early C++:
- References went in late, and many things that should
have been references are pointers. "this", for example.
|
You could argue that either way. You could say that we use the object's
address a lot more than the object itself...
While we're on the topic, what other than "this" should have been a
reference?
| Quote: | - With neither generics nor RTTI in early versions, the
concept of unchecked type downcasting became widespread,
and some of it is still around.
|
This is the fault of an individual programmer -- not C++.
| Quote: | - New-style casts went in late, and as a result, old-style
casts, which probably shouldn't have been in C++ at all,
were and are widely used.
|
This is the fault of an individual programmer -- not C++.
-Tomás
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Nicola Musatti Guest
|
Posted: Mon Mar 27, 2006 5:20 pm Post subject: Re: C++ Scandal?! |
|
|
Ted wrote:
| Quote: | Is the complexity of C++ by design? The motive being to artificially
create levels of high cost personnel required to use it and also to ensure
only few can create the tools. The old "job security trick"!
|
You could see it in another way: C++ is this complex so that applicants
lacking the qualities indispensible to great programmers are more
easily spotted ;-)
Cheers,
Nicola Musatti
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Steve Clamage Guest
|
Posted: Mon Mar 27, 2006 6:07 pm Post subject: Re: C++ Scandal?! |
|
|
Ted wrote:
| Quote: | Is the complexity of C++ by design?
|
No, it just grew. C++ was not designed as a whole, but evolved over
time. A primary source of complexity is compatibility with the
ideosyncracies of C. Added features did not always mix well with earlier
features, and the difficulties of "corner cases" were not always
appreciated at the time a feature was added. You can get the full story
in the book "The Design and Evolution of C++" by Bjarne Stroustrup,
Addison Wesley.
| Quote: | The motive being to artificially
create levels of high cost personnel required to use it and also to ensure
only few can create the tools. The old "job security trick"!
|
Nope.
It is not difficult to write straightforward, efficient, portable,
maintainable C++ code. Individual programmers sometimes write code that
is none of the above, but the same is true in every programming language.
A degree of education is needed to use any tool effectively. Is C++ more
difficult to learn to use well than some other popular languages? Yes,
but it also allows you to do some things more easily.
| Quote: |
There seems to be signs that the above is true (censorship in the moderated
C++ groups for one).
|
There is no censorship, in the usual meaning, in the moderated C++
groups. A standard of discourse is required (no personal attacks), and
postings are required to be on-topic. If a posting does not meet these
two requirements, it is returned to the sender with a polite explanation.
If the posting was off-topic, the moderator explains why, and suggests
appropriate newsgroups. (Bicycle races might be interesting, but this is
not the newsgroup to discuss them. Try alt.rec.bicycles.)
If the posting was considered a personal attack, the moderator explains
why, and suggests how to make the posting appropriate. (Take out "George
is an idiot" and the rest of the posting is OK.)
In all cases, the original poster can appeal the decision, and sometimes
a posting that was originally rejected is accepted after a review.
The C++ newsgroups originally were not moderated (comp.lang.c++ is still
not moderated). They accumulated spam, off-topic posts, and flame wars,
which made the newsgroups unpleasant to read and nearly useless. I
haven't looked at comp.lang.c++ for a long time, but the last time I
did, it was at least 90% noise. If you pefer a high percentage of noise
and flame wars, you can read that newsgroup instead of the moderated
ones, and post anything you want.
---
Steve Clamage, stephen.clamage (AT) sun (DOT) com
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Seungbeom Kim Guest
|
Posted: Tue Apr 04, 2006 9:06 pm Post subject: "this" as a reference (was: Re: C++ Scandal?!) |
|
|
John Nagle wrote:
| Quote: |
A few of the legacy problems from early C++:
- References went in late, and many things that should
have been references are pointers. "this", for example.
|
I have heard this mentioned often, but if this were a reference,
how would you get around overloaded operators such as operator&()
or operator->()?
--
Seungbeom Kim
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Apr 05, 2006 4:06 pm Post subject: Re: "this" as a reference (was: Re: C++ Scandal?!) |
|
|
Seungbeom Kim wrote:
| Quote: | if 'this' were a reference,
how would you get around overloaded operators such as operator&()
or operator->()?
|
T* AddressOf(T& x)
{
char& c = reinterpret_cast<char&>(x);
return reinterpret_cast<T*>(&c);
}
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
Tomás Guest
|
Posted: Wed Apr 05, 2006 6:06 pm Post subject: Re: "this" as a reference (was: Re: C++ Scandal?!) |
|
|
| Quote: | T* AddressOf(T& x)
{
char& c = reinterpret_cast<char&>(x);
return reinterpret_cast<T*>(&c);
}
|
What's that?
Are you trying to write a function which will return the address of an
object which is passed to it by reference?
template<class T>
T* AddressOf(T& object)
{
return &object;
}
It's undefined behaviour to use reinterpret_cast change one pointer type
to another. You can only change to and from "void*".
-Tomás
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
James Dennett Guest
|
Posted: Wed Apr 05, 2006 6:06 pm Post subject: Re: "this" as a reference |
|
|
NULL (AT) NULL (DOT) NULL wrote:
| Quote: | T* AddressOf(T& x)
{
char& c = reinterpret_cast<char&>(x);
return reinterpret_cast<T*>(&c);
}
What's that?
|
It was a reply to
| Quote: | if 'this' were a reference,
how would you get around overloaded operators such as operator&()
or operator->()?
|
I.e., an explanation of how to get the address of an
object when operator& has been overloaded for the type
of that object.
| Quote: | Are you trying to write a function which will return the address of an
object which is passed to it by reference?
|
Yes, in special circumstances.
| Quote: | template<class T
T* AddressOf(T& object)
{
return &object;
}
|
This would call the overloaded operator&, which might
not return the address (and might not even return a T*).
| Quote: | It's undefined behaviour to use reinterpret_cast change one pointer type
to another. You can only change to and from "void*".
|
Not quite; there are other rules that allow some specific
cases other than this. This technique is used, for example,
in boost, and has been discussed at some length -- for
numerous reasons we need to be able to get a char* pointing
at an object, and to the best of my knowledge the rules *do*
allow this, though I don't have citations to hand.
-- James
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ] |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|