C++, is it Dead?

M

marcwentink

Henrik:
I've personally come to the conclusion that most Java and C# programmers are
less knowledged then average C++ programmers (at least judging from the
people I've met so far).

Yes but this does not say anything about the future of C++!?? For
example programming in assembler would also teach me a lot of things
about the system architectuur, but would I need it to solve a customer
problem? That you need less technical knowledge to provide a solution
in Java/C# then in C++, to me would be an indication that the first
two languages have the future!

Furthermore, give me the mayor players now investing in C++ development
tools? MicroSoft is going for .NET and C#, Borland CBuilder is a small
player. Then what is left, GNU? And yes, you are very clever
programming low level things without a nice IDE, not paying for
licenses, but in the end, I do not care less about that. I have to earn
my salary to pay the morgage, that's your first objective if you have a
young familly. I would not care that much about the tool I am using, I
just want to provide a solution, that gives me the revenues.

And then, a software engineer has to have more qualities then
understanding a computer language. Mostly say a 10% percent of the
total possibilities of C++ allow you to solve 90% of the problems. The
skill really needed is to define the problem. In which language you
then solve it, it depends, some have this possibilty, other tools and
languages the other, but it's not the main thing I think.

Marc Wentink
 
H

Henrik Goldman

Uh... Are we saying that the Standard Library is some how not it?
Besides, what *is* common development framework? Development of
what, exactly?

STL and the standard C++ functions are fine. However they are outdated in
their way of usage. It's pretty clear that both java and C# picked up ideas
from STL (and other frameworks) and have redesigned them to have even better
interfaces then what C++ standard libraries define.
There is nothing wrong or surprising with this. .NET was introduced less
then 6 years ago. The C++ framework has a much longer history.
As I program C++ every day I often face the problem that the libraries are
incomplete in it's usage. Often you end up going back to C functions.
So the interface is not as clean as if you would have it designed from
scratch.

If people would have been given the option to delete all history and make a
new C++ library from scratch would it look like the current? Probably not.
Even Microsoft tried to make a new set of standard C functions which helps
on security against buffer overruns etc. (e.g. sprintf_s).

-- Henrik
 
H

Henrik Goldman

Yes but this does not say anything about the future of C++!?? For
example programming in assembler would also teach me a lot of things
about the system architectuur, but would I need it to solve a customer
problem? That you need less technical knowledge to provide a solution
in Java/C# then in C++, to me would be an indication that the first
two languages have the future!

All 3 languages has a future. Remember someone has to continue write new
runtimes for the interpretted languages ;-)

Btw. stuff like real-time development java probably won't be your natural
choice of language.

In my case I'm writing software for different platforms. I can tell you my
software works on win32, win64, linux, solaris, mac os x and soon also aix
and hp-ux. Also parts of the software has been made to work on Windows CE.
Which other language can let you write software from embedded devices to
high-end servers?
C# is out of the game here. Java will probably work to some extent. However
who can guarrantie if the java runtime will be available for the next
platform I port to? If I say to my customers that I cannot handle the task
they will just laff at me and go to the competitor instead.

I fully agree with you if the *problem* is not about computers then you can
use any language you want. Today I wrote a simple app in C# which is about
50 lines of code. It would have taken me much longer if I would do it in C++
since I both use smtp server and xml parser. Without extra libraries I could
not have done the same.

-- Henrik
 
T

Tomás

Henrik Goldman posted:
As I program C++ every day I often face the problem that the libraries
are incomplete in it's usage. Often you end up going back to C
functions. So the interface is not as clean as if you would have it
designed from scratch.

I see the C functions as a legitimate chunk of the Standard Library -- I
don't see anything wrong with using them.


-Tomás
 
M

marcwentink

Henrik
Btw. stuff like real-time development java probably won't be your natural
choice of language.

No, C++ is the best here. Absolutely.
Java will probably work to some extent.

If your problem is not too 'low level', java is the choice since it is
made to run on different platforms.
Today I wrote a simple app in C# which is about
50 lines of code.

I think for simple GUI-apps used by say administrative workers C++ is
out. It used to be most MSVC-MFC and Borland C++, but the first is
replaced by C# MicroSoft wants to boost, and Borland is trying to sell
his IDE tools, and the Borland managent does not seem to think indepent
developpers and small software businesses are profitable clients for
them anymore. So here there is a part of the C++ market that is
declining.
 
E

Earl Purple

Henrik said:
If people would have been given the option to delete all history and make a
new C++ library from scratch would it look like the current? Probably not.
Even Microsoft tried to make a new set of standard C functions which helps
on security against buffer overruns etc. (e.g. sprintf_s).

No, I wouldn't. The downsides in C++ as I see it are the lack of
standard libraries for graphics and GUI, for networking/internet and
for threads. A standard database connectivity would also be useful, in
fact why not a standard database (MySQL anyone?) Of course there is a
lot of "open-source" available. In reality it's not always so widely
known and it can be a problem convincing your boss/systems
administrator that you should use them. That's if they've decided to
use C++ as the language anyway, and most of the time it's because there
is legacy code in C++ (usually very badly written).

And little issues with regard to exception and thread-safety that can
cause problems. And the "virtual destructor" bug, plus other little
"traps".

Lack of garbage collection I don't really see as a problem with
shared_ptr now being brought in. One sometimes has to be careful about
shared_ptr though.
 
M

Mateusz Loskot

Henrik said:
I fully agree with you if the *problem* is not about computers then
you can use any language you want. Today I wrote a simple app in C#
which is about 50 lines of code. It would have taken me much longer
if I would do it in C++ since I both use smtp server and xml parser.
Without extra libraries I could not have done the same.

What's the difference between library from .NET Framerwork and
so called external library?
IMHO there is no difference.
..NET evangelists from MS always talk about less number of lines of
code...but they usually forget about the huge amount of libraries behind.
Second, C# language is not a .NET Framwork, similarly as C++ language is
not a standard library. So, if someone says "you can write it in C# with
less number of lines than in C++" she obviously is wrong.

IMO there is no difference between: C# + .NET Framework and
C++ + standard library + boost + e.g. any external library like curl or
expat.

Cheers
 
H

Henrik Goldman

What's the difference between library from .NET Framerwork and
so called external library?
IMHO there is no difference.

You're completely right. The only difference is about how "complete" a
library is. Since I write C++ code every day I've had to make my own
extensions to built-in function to make them do what I want.
What I said in one of the earlier posts was that .NET does not have any
legacy. It is superior a monopoly invension and Microsoft has the option
(and enforce) to remove old functions as new ones become available which are
better then the existing.
As I also said in my earlier post the .NET library is in many ways superior
since it offers functions which noone ever imagined when the time C++ was
invented. It's continues development. Naturally it has to become better over
time. If C++ library was designed from scratch today I don't think it would
have looked completely the same way.
.NET evangelists from MS always talk about less number of lines of
code...but they usually forget about the huge amount of libraries behind.

Yeah. I completely agree with you. Thats why I find it fun to make such a
person sit infront of a C++ compiler and show their real skills. After 5 min
they are stuck ... and I go tell them the solution. :)
Second, C# language is not a .NET Framwork, similarly as C++ language is
not a standard library. So, if someone says "you can write it in C# with
less number of lines than in C++" she obviously is wrong.

Save your talk for the newbies. I know that C# is very very similar to C++.
IMO there is no difference between: C# + .NET Framework and
C++ + standard library + boost + e.g. any external library like curl or
expat.

Yes there is. It's about the cleaness and about the presentation. Since .NET
was created by one company it has a more streamlined interface then C++
libraries. You have only one source of documentation and most of the times
it's easy to do qualified guesses on how to use functions without using the
docs (not something I am a fan of though).
Again it boils down to .NET beeing a newer library then any of the others.

-- Henrik
 
H

Henrik Goldman

I see the C functions as a legitimate chunk of the Standard Library -- I
don't see anything wrong with using them.

When were they invented? Late 1970'ties? The wrong part about them is that
most functions are not very well designed. Have you never had issues with
thread-safety in C functions? Some parts of my recent app had to be locked
under a mutex since lots of C functions are beeing used and things gets
uncontrolable in a multithreaded application when using something like
strtok() or similar functions.

The problem boils down to that they are old and their interface of usage is
certainly much different then the C++ library.

An example:

I often use sprintf() to control how chars and numbers are written into a
string. It's much more simple then the stream based aproach I think. However
it doesn't mix well with std::string. Also why is there actually two
aproaches (streams and C functions)? If they're designed for the same
purpose it's a sign of inefficient library design.

-- Henrik
 
M

Mateusz Loskot

Henrik said:
Yes there is. It's about the cleaness and about the presentation.

For me it's a minor argument.
Since .NET
was created by one company it has a more streamlined interface then C++
libraries.

IMO it's a disadvantage. You completely dependant on particular vendor.
In C++ you can use STLport or Dinkumware's libraries or write your own.
You can also use C++ compiler you want, but you don't have to stick to
one vendor.
You have only one source of documentation and most of the times
it's easy to do qualified guesses on how to use functions without using the
docs (not something I am a fan of though).

I see it as a main reason .NET programmers are less qualified than C++.
Microsoft teaches them how to not to use documentation and manuals, how
to program without reading docs!!!
Let's make a test, sit some .NET developer with in front of computer
with only notepad and command prompt. Without IntelliSense, I'd say 80%
of poor .NET developers will fail with writting smple console based apps.
Again it boils down to .NET beeing a newer library then any of the others.

I don't understand it.

Cheers
 
H

Henrik Goldman

It also requires syntactic changes to the language.
The use of .NET

What changes? Actually a library is independent of the language in some
sense. If microsoft wanted that it should have worked with C++ they would
have. But the runtime library is only part of what they have made.

-- Henrik
 
H

Henrik Goldman

IMO it's a disadvantage. You completely dependant on particular vendor.
In C++ you can use STLport or Dinkumware's libraries or write your own.
You can also use C++ compiler you want, but you don't have to stick to
one vendor.

Yes you're right and I agree with you. If Microsoft says they don't want it
to work on Linux, then it won't work on Linux. Thats what I like about C++.
Microsoft doesn't own it and cannot make anything but minor enhancements to
the syntax and runtime.

However one plan I heard was that future Windows should rely on .NET for
programming.
I see it as a main reason .NET programmers are less qualified than C++.
Microsoft teaches them how to not to use documentation and manuals, how
to program without reading docs!!!

I have had friends who asked me "how do I do this or this" and they are just
too lazy to open up the manual. So I said to them that they can read about
it here and here but the correct answer was so and so. They responded that
they could do that some other time when they got retired. Really bad I
think. Sometimes I wanted to say to them that they might as well leave their
brain at home as well.
Let's make a test, sit some .NET developer with in front of computer
with only notepad and command prompt. Without IntelliSense, I'd say 80%
of poor .NET developers will fail with writting smple console based apps.

Heh. You're completely right :) Not all of them can do safe programming
even WITH .NET (no pointers for instance) and WITH documentation.
I don't understand it.

It's very simple. C++ runtime library is from 1990's. .NET was created in
2001 and has been since then improved in 2005. Don't you think that .NET
learned from other languages mistakes and wanted to find solutions to make
it even better and easier to use?
If I would be a language designer I would first do what others did good and
extend it to make it better. Learn from others mistakes, no? :) Therefore
it's not a surprise that .NET runtime library is better in many ways.

-- Henrik
 
N

Noah Roberts

red said:
The use of .NET

I still fail to understand. There is no language not invented by MS
that can make use of .NET. They are designed solely to work with it
and can't be used anywhere else. Therefor, why would they require any
changing to work with .NET since that is their sole purpose and reason
for design?
 
R

Rui Maciel

hotice said:
In enterprise deverloping, c++ is  not a good choice.

I believe that the computer games industry has largely adopted C++ as the
definite language to develop computer games.


Rui Maciel
 
R

red floyd

Henrik said:
What changes? Actually a library is independent of the language in some
sense. If microsoft wanted that it should have worked with C++ they would
have. But the runtime library is only part of what they have made.

So you're telling me the ^ as pointer operator, and "ref" as a keyword,
and any of the other fun stuff aren't syntactic changes to the language
to make it work with .NET?
 
N

Noah Roberts

red said:
So you're telling me the ^ as pointer operator, and "ref" as a keyword,
and any of the other fun stuff aren't syntactic changes to the language
to make it work with .NET?

What language?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top