473,769 Members | 3,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The Future of C++ ?

If you had asked me 5 years ago about the future of C++, I would have
told you that its future was assured for many years to come. Recently,
I have been starting to wonder.

I have been teaching C++ at a local polytechnical school here in
Vancouver, Canada for approximately 8 years. Six years ago, at the
height (or should I say volume?) of the internet bubble, I had 80+
students per semester in my C++ course. Now I am fortunate to have 15
students per semester. What has changed? I believe that students are
no longer interested in learning C++. They would rather learn .NET
languages or Java (my colleages who teach these courses seem to be very
busy!). I believe it is because these other languages are easier to
learn and/or are perceived to be more relevant today.

I do believe that C++ is more difficult to learn than many of these
other languages. Despite my best efforts to make them exciting, I see
the eyes of my students start to glaze over when I start explaining
pointers. When I ask them to tokenize an english sentence (using the
strtok() function) and print the token in reverse order (they need to
declare an array of type char * and save the addresses of the tokens in
this array), I experience near panic from many of my students. But
these concepts need to be taught in a responsible C++ course. As was
pointed out to me recently, Microsoft still requires applicants to
demonstrate a very good knowledge of string manipulation using C-style
strings (none of these fancy string class objects!) when recruiting C++
programmers.

The ironic part is there is still a large demand for C++ developers
here in Vancouver. In fact, the company that I believe employs the
most developers here in Vancouver, employs almost entirely C++
programmers. This company, Electronic Arts (if you have not heard of
them, I guarantee that your kids have -- they create video games) is
only one of several gaming companies here in Vancouver that employ
primarily C++ programmers. Other companies like Kodak, MDSA, Nokia,
MDSI, etc. also employ large numbers of C++ programmers. Not
surprisingly, I have talked to several companies here in Vancouver who
are complaining that they are having difficulty finding C++ developers
and are looking at trying to recruit from abroad (eastern Europe
primarily).

I believe that many of these companies will be forced to migrate away
from C++ in the near future, simply because they will not be able to
find C++ programmers in the future. Soon the baby boomer C++
programmers will begin to retire, then the proverbial @@@@ will really
start to hit the fan!

Please tell me I am wrong, and paint me a view of the future which
includes C++.

Nov 18 '06
190 8174
"blangela" <Bo***********@ telus.netwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
>
Tony wrote:
>"blangela" <Bo***********@ telus.netwrote in message
news:11******* *************** @j72g2000cwa.go oglegroups.com. ..
>
AP********@gmai l.com wrote:
blangela wrote:
I have been teaching C++ at a local polytechnical school here in
Vancouver, Canada for approximately 8 years.
[...]
>Well note too that the bookstores are dumbing down the book selection to
commercial product manuals rather than computer science stuff. Today's
generation of "programmer s" are closer to assembly line workers than
their predecessors.

Tony

I agree with you on this point. I know of a Java instructor at my
school who feels it is a waste of time to teach students data
structures or sorting algorthms -- Java provides different container
classes and sorting algorthms to select from, so why should the student
need to learn these topics. I disagree. I feel that there is still
room for the "science" in "computer science".
I completely disagree with the Java instructor as well. Data-structures and
sorting algorithms' are fundamental! Its sad that the current trend in
computer science seems to be aimed at very high-level languages which
abstract fundamental methods and techniques away to a dangerous point. It
can lead to a scenario in which a Java programmer might not now how to
create or even sort a linked list. The Java programmer might not even now
how to create a dynamic array from scratch... I feel your pain!
Nov 27 '06 #81
Chris Thomasson wrote:
"blangela" <Bo***********@ telus.netwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
>>Tony wrote:
>>>Well note too that the bookstores are dumbing down the book selection to
commercial product manuals rather than computer science stuff. Today's
generation of "programmer s" are closer to assembly line workers than
their predecessors.

Tony

I agree with you on this point. I know of a Java instructor at my
school who feels it is a waste of time to teach students data
structures or sorting algorthms -- Java provides different container
classes and sorting algorthms to select from, so why should the student
need to learn these topics. I disagree. I feel that there is still
room for the "science" in "computer science".


I completely disagree with the Java instructor as well. Data-structures and
sorting algorithms' are fundamental! Its sad that the current trend in
computer science seems to be aimed at very high-level languages which
abstract fundamental methods and techniques away to a dangerous point. It
can lead to a scenario in which a Java programmer might not now how to
create or even sort a linked list. The Java programmer might not even now
how to create a dynamic array from scratch... I feel your pain!
How many new grads can build a system in asembly language?

As an field grows, one either has to specialise in a niche, or become a
generalist.

If they haven't done so already, CS degrees will follow that path.

--
Ian Collins.
Nov 27 '06 #82

gn wrote:
Earl Purple schrieb:

Well - The problem here is that there is one java against many different C++ compilers.
Java 5 has some significant changes in it.
Normally one should think that if you are
programming C++ conform to the standard (and of course capsulating (I
still don't know the right word here in english) system functions) your
programs should compile at every platform where you have a C++
compiler. In reality thats not the case because many compilers are not
conform with the standard, especially concerning templates.
Well we are dealing with 3 situations:

- Open-source libraries. They need to build in your compiler but once
you've built it you can link it with your code easily. I much prefer
using open-source libraries. The only issue is when they're written in
macros because of all the different compilers they might be dealing
with, and particularly if they require you to set some define just to
have it compile standard C++. The situation should be that those who do
not have standard-complliant compilers should be the ones who have to
define something.

- Pre-built libraries. Now you have to get the binaries from the
vendor, and usually there are a certain number of header files but they
are basic enough to work for any compiler. The clash now comes with
linking against run-time libraries.

- Hybrids which could have the worst of both worlds, i.e. you need
compiler-specific defines and have to build with the correct runtime
library. Visibroker is the actual one I had problems with.
Additionally people who are using things like visual C++ or Borland C++
Builder are often not aware of using non standard libraries. You are
also right with the different GNU versions where I had some problems
with my template syntax.
It is incredible how many are still using VC6. Problem is of course, a
lot of their code would break on VC7/8 because it's full of "wrong" C++
that VC6 would compile.

The same is true for any modern C++ compiler, although GNU usually
allows specific switches for backward compatibility.
But all this is not a problem of C++, but of the compiler developers
(let's see what the next standard brings and how fast they are in
implementing it to all compilers). There are also many other things
that I am missing in current compilers (e.g. return value optimization
for recursive functions). I really think that C++ will become much
faster in the future because there are many such things to optimize
that is to complicated for todays compilers.
Runtime performance is not the main issue. Java has improved in that it
has improved its runtime performance to be adequate enough. Whether it
matches C++ is not always relevant, as long as it is adequate for the
task in hand. (In some cases Java can match C++ perfectly well or even
out-perform it).

The big issue here seems to be portability. C++ badly lacks a standard
runtime library in the way C has one, and a standard demangler so that
you can link GNU libraries with VC8 or Solaris ones on their specific
platforms without requiring a "C" interface.

In addition, I still feel that the reluctance of C++ to have a standard
for a network, threads, file-system, graphics device etc is something
serious lacking as part of its portability, even if there are 3rd party
libraries for many of these things, even open-source ones.
In the end everything depends on the specific tasks. For my field of
work (computational chemistry) it's simply no question to use anythingh
else than C++ or Fortran, because those quantum chemical calculations
are still to slow even on huge clusters and even for small molecules. I
also think for bigger projects in the software companies it should be
no problem to have C++ and java programmers working on the same
project. It's no problem if you have a good design.
For this there is always JNI which allows Java to interact with C. The
"D" programming language can also interact with C libraries. Once again
C++ is left out of the equation.

Nov 27 '06 #83

Tony wrote:
>
If I was an instructor at a university, I would NOT put templates into a
first semester class. That's an advanced and additional paradigm and
requires choice to "buy into" IMO. I view C++ as a smorgasbord: I'll
eat what I want and like (no sushi for me!).
I would. Collections would be one of the first subjects I would teach.

One of the least important features of C++ is cin. I do not have a
single cin in any of my C++ production code. Yet it seems to be the
first thing programmers seem to learn.
Actually, even before C++, it would probably be better to take a
general studies course on programming paradigms! Then students can
take C++ as an course tailored to their needs. (No, that won't work,
cuz students by definition can't make that choice). Oh well, something
like that then.
Surely paradigms though must include handling collections.

Nov 27 '06 #84

Greg wrote:
>
It may be instructive to draw some parallels between programming
languages and car transmissions. Programming in C++ is a lot like
driving a car with a manual transmission - both require "above average"
skill than the alternative available technology requires: be it
programming in a managed language or driving a car with an automatic
transmission.
Greg
A better analogy would be between building a car in Java or building
one in C++.

In Java, you would get all the components and put them together,
including the wheels.

In C++ though there is no standard for a wheel because there are some
vehicles, i.e .boats, don't have wheels so there is no need for a
standard. So you have to "reinvent the wheel" or fit one from a 3rd
party manufacturer, the only problem with that being that getting their
wheels to fit your vehicle is not always an simple matter, at least not
as straightforward as it is to fitting a standard one, because the
diagnostics of the wheels are such that they have side effects on the
rest of the manufacture of your car.

Nov 27 '06 #85

sw****@post.sk wrote:
I believe that developers are using templates too few.

The book I suggest to C++ beginners is Accelerated C++. I didn't
actually read it because by the time I found out about it I didn't need
it anymore. But I had a quick look through it to evaluate whether it's
good for my less experienced [ex]colleagues.
Unfortunately what looks great teaching material by those who know the
language well does not always prove to be the case. You have to try it
out on students and see how well they pick it all up.
And I think that Bob
Langelaan could use it to improve the course too, following the
suggestion of Alf P. Steinbach to start with standard library classes.

One of the more remarkable facts about the book is that template
functions are introduced in chapter 8 while classes are left for the
chapter 9. I think it's not because they are more important than
classes, but rather because they are easier to learn and they can
simplify your code.
What do they teach in chapters 1-7? Writing console apps with a lot of
cin statements?
Bluntly put, if you avoid using templates, you avoid one of the best
features of C++. You can work around that to some degree using
inheritance and virtual function overriding, but this introduces
unwanted dependencies, some (usually unimportant) performance
hit and you also lose some advantages of the static typing in the
process.
That is true but templates can also be used in the wrong place.
Template classes are often written where only a small proportion has
"dependent" code (i.e. code dependent on the template type). Such a
template should often be refactored to have a non-template handle the
non-dependent code.

Nov 27 '06 #86

blangela wrote:
>
I notice that I have not seen a single post in this thread from an
instructor stating that their C++ classes are increasing in size
or even maintaining their size.
Ah, they are getting cleverer at not writing monolithic classes
anymore. Better refactoring
I know that I get students from UBC (one
of the 2 large local uniiversites, the other being SFU) who want to
learn C++. They complain that it is no longer available at UBC. Also,
when I first started teaching C++, there were several other local
colleges doing the same. Now I believe only BCIT (where I teach) is
still doing so.
Course in Java: Here is a computer. We will learn to write applications
that use all the modern features: GUI, hey we can run even in a
browser. Networking - no problem. And we can process concurrently...
Java is very useful because a lot of companies are writing brand new
software in it.

Course in C++: Here is a computer. Now let's get a DOS shell up and
write a console app. And even when you ask the user to type in a
number, there is no method to intercept the key as the user hits it, so
if the user types in "Blah" you have to go back and say "sorry that's
not a number". If we're lucky we might even write our source with the
vi editor where you have to carefully switch between modes because
there's no such thing as Ctrl or Alt so characters mean different
things at different times. C++ is very useful because there's lots of
legacy code out there written in it, usually very badly, and you can
get a job maintaining it.

Now if you are student which do you choose?

On the subject of maintaining a legacy app, yes it makes economic sense
to do so rather than go for the rewrite. You could say the same for the
language itself. Better to maintain it and even add some new features
rather than go back and write a new one from scratch which is simply
much better.

Now everyone in the C++ market seems to be claiming that the language
is used for device drivers or the "embedded" world. Now where is the
university course saying "here is a robot, now we are going to program
some C++ into its microchip". Might just be the way to make it a bit
more exciting. People would like to learn how to program robots. They
look modern. Instead of writing "hello world" and some horrible console
app with cin, we could program it to make us a cup of tea.

Nov 27 '06 #87

Frederick Gotham wrote:
blangela:
I notice that I have not seen a single post in this thread from an
instructor stating that their C++ classes are increasing in size, or
even maintaining their size.


Programming instructors don't tend to be of the highest proficiency.
They should be excellent teachers. The best programmers are usually out
there programming in it, not teaching it. But the best programmers
aren't necessarily good teachers either.

Nov 27 '06 #88
* Earl Purple:
blangela wrote:
>I notice that I have not seen a single post in this thread from an
instructor stating that their C++ classes are increasing in size
or even maintaining their size.

Ah, they are getting cleverer at not writing monolithic classes
anymore. Better refactoring
> I know that I get students from UBC (one
of the 2 large local uniiversites, the other being SFU) who want to
learn C++. They complain that it is no longer available at UBC. Also,
when I first started teaching C++, there were several other local
colleges doing the same. Now I believe only BCIT (where I teach) is
still doing so.

Course in Java: Here is a computer. We will learn to write applications
that use all the modern features: GUI, hey we can run even in a
browser. Networking - no problem. And we can process concurrently...
Java is very useful because a lot of companies are writing brand new
software in it.

Course in C++: Here is a computer. Now let's get a DOS shell up and
write a console app. And even when you ask the user to type in a
number, there is no method to intercept the key as the user hits it, so
if the user types in "Blah" you have to go back and say "sorry that's
not a number". If we're lucky we might even write our source with the
vi editor where you have to carefully switch between modes because
there's no such thing as Ctrl or Alt so characters mean different
things at different times. C++ is very useful because there's lots of
legacy code out there written in it, usually very badly, and you can
get a job maintaining it.

Now if you are student which do you choose?

On the subject of maintaining a legacy app, yes it makes economic sense
to do so rather than go for the rewrite. You could say the same for the
language itself. Better to maintain it and even add some new features
rather than go back and write a new one from scratch which is simply
much better.

Now everyone in the C++ market seems to be claiming that the language
is used for device drivers or the "embedded" world. Now where is the
university course saying "here is a robot, now we are going to program
some C++ into its microchip". Might just be the way to make it a bit
more exciting. People would like to learn how to program robots. They
look modern. Instead of writing "hello world" and some horrible console
app with cin, we could program it to make us a cup of tea.
Except -- for robots specialized control languages are better than
C++. And in the embedded world one uses restricted dialects of C++ that
aren't really C++. For example, when you remove exceptions from the
language you also remove the whole point of constructors, and what's
left isn't much more than a simple syntactical device (writing p->foo()
rather than p->vt->foo( p ) or CALL( p, foo, () )).

If I were to teach C++ today (I did many years ago) I'd focus on Windows
applications.

E.g., I imagine it's slightly difficult to do a Windows system tray icon
in Java, unless someone has made a C++ library for that for Java.

I think Windows applications comprise the last bastion of C++.

And it's crumbling: most new Windows applications will be .NET based,
and then better written in C#. That leaves C++ as a "glue" language,
e.g. writing those Java platform libraries. Oh well.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Nov 27 '06 #89
"Earl Purple" <ea********@gma il.comwrote in message
news:11******** **************@ j44g2000cwa.goo glegroups.com.. .
>
blangela wrote:
>>
I notice that I have not seen a single post in this thread from an
instructor stating that their C++ classes are increasing in size
or even maintaining their size.

Ah, they are getting cleverer at not writing monolithic classes
anymore. Better refactoring
> I know that I get students from UBC (one
of the 2 large local uniiversites, the other being SFU) who want to
learn C++. They complain that it is no longer available at UBC. Also,
when I first started teaching C++, there were several other local
colleges doing the same. Now I believe only BCIT (where I teach) is
still doing so.

Course in Java: [...]
And we can process concurrently...
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^

Java memory model is so damn strict that it makes it impossible to create
any high-end synchronization algorithms. Period. But then, does the average
Java programmer even know this fact? I bet 99% do not. Simple example of how
learning Java first can, and will, burn you:
Java teacher: Now we are going to learn about arrays. Java has this class
you see...
Student: How does Java actually implement that class?
Java teacher: I don't know. But, it works so lets start learning!
Student: What a fuc#king rip off!

>
Course in C++:
[...]
C++ is very useful because
I can use it with Assembly Language to create a high-end synchronization
algorithms. I can use to create a full blown Java VM... I can use C++ to
prototype virtually anything for that matter. Can't use Java for any of
that.

there's lots of
legacy code out there written in it, usually very badly, and you can
get a job maintaining it.
I hope you don't think that the reason C++ is still around is because of
legacy code?

Now if you are student which do you choose?
C++ for sure! You should learn the fundamentals before you choose to
sacrifice yourself to very high-level language that is governed under a
"private" standard.
Nov 27 '06 #90

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

47
3664
by: David Eng | last post by:
> For many years now enterprise business application development has > been the core area for the use of C++. > Today a significant share to this segment has already been lost to > SUN's Java technology and with MS now abandoning C++ in favour if its > proprietery .NET and C# technology, how long can we except C++ to hold > on against these might competitors? > Has C++ become a dying language? > What is the future of C++? As I posted...
35
3354
by: GTO | last post by:
I do not believe that C# is the future of C++. I also do not believe that adding two thousand new library functions to the standard library is the future of C++. But what is the future of C++? Is it as good as a programming language can get? Like so many of you, I programmed speech recognizers, image recognition systems, a portion of a chess program, lots of numeric code using STL, and tons of other applications in C++, (even firmware...
9
2368
by: Lyle Fairfield | last post by:
It's confusing. Many people here and elsewhere make many different predictions: There's an introduction mentioning some aspects of this at http://msdn.microsoft.com/data/mdac/techinfo/default.aspx? pull=/library/en-us/dnmdac/html/data_mdacroadmap.asp revised Sep 2005 (upper case conversions are mine)
2
2165
by: | last post by:
Everything seems to be moving to .NET and VC++ seems to be adding a lot of managed code support every new release. The questions: is unmanaged code in VC++ beeing phased out in favour of managed code? And suppose I still program in VC++ 6.0, can I safely assume that the code I use in VC++ 6.0 will still be available in future VC++ versions. Finally will VC++ 6.0 generated executables be still be able to run on futur Windows versions and...
0
1854
by: Fuzzyman | last post by:
Hello all, The following is a copy of a blog entry. It's asking a question about future statements and the built in compile function. I'd appreciate any pointers or comments about possible approaches. `Movable Python <http://www.voidspace.org.uk/python/movpy/>`_ supports running both Python scripts and ``.pyc`` bytecode files. It does this by compiling scripts to bytecode, or extracting the code object from bytecode files, and then...
29
3133
by: Zootal | last post by:
My apologies if this gets asked/discussed a lot. With c# rampaging through corporate USA (and other countries), what impact will this have on the usage and future of c++? I've used both of them a bit. I'm in school, and our CS program does not use c#, but uses mostly c++ and a bit of java. C# is relegated ot the CIS programs. Out there in the real world, what kind of a future does c++ have?
6
14452
by: rohayre | last post by:
Im a long time java developer and actually have never done anything with java scripting. I'd like to write a short simple script for calculating a date in the future based on today's date and a letter. Can I use javascripting to create a webpage to allow a user to enter a letter and then click a button to find a future calendar date? I'm just not sure how much user interaction scripting allows. Does java scripting allow buttons, textfields...
5
3593
by: KimmoA | last post by:
Does C have a future? I'd like to think so, but nobody seems to agree with me. Of course, I don't use C in my profession, and maybe I wouldn't be using it if I had the pressure to actually produce things with deadlines and stuff. Hmm. That's a depressing thought. I can't stand OOP. Yes, it is beautiful in theory, and it might make sense for huge projects with many people involved, but I don't want anything to do with it. (I switched to C...
51
3434
by: Jon Harrop | last post by:
If Microsoft turn F# into a product and place it alongside C# and VB, will many people migrate from C# to F#? -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com/products/?u
0
10035
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9851
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8863
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2811
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.