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
Java references (e.g., strong thread-safe reference counting) in C++? No
problem:

http://appcore.home.comcast.net/vzoom/refcount/
This can be used as an alternative to Boost shared_ptr, which is only basic
thread-safe....
You got me interested. I briefly visited the site, but missed any
description on how to do that.

Can you point me in the right direction? (I guess we both understand
that using atomic operations to increment/decrement reference count is
far from lock free ;)

Mirek

Nov 27 '06 #91
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!

Smart-Ass-C++-Student:

I know how they implemented the array class... They used C/C++ dip shit!!
lol...
;^)
Nov 27 '06 #92

Phlip wrote:
loufoque wrote:
Refcounting is not the same as a GC.

In terms of language advocacy, C++ gives you the tools to build whatever
quasi-GC system you want (including a true GC). It doesn't bend you over and
Uh, no not really. Best you can hope for AFAIK is some sort of
conservative GC.

Mirek

Nov 27 '06 #93
Chris Thomasson wrote:
"Earl Purple" <ea********@gma il.comwrote in message
[snip]
>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!
C++ teacher: Now we are going to learn about variable length arrays. C++ has
for instance the deque<template, you see ...

Student: How does C++ actually implement that template?

C++ teacher: That is implementation defined according to the standard. All I
can tell you for sure are the following guaranteed complexity bounds...

Weak Student: What the heck, who cares about -- what did you call way too
complex bounds?

Strong Student: Cool, but (a) that does not answer my question and (b) why
are there no bounds on space?

>>
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.
I would like to see the C++ course completion of which will enable you to
create a full blown Java VM. Do you seriously suggest that, say, as a term
paper?
>
>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.
And you should learn to make screws from blocks of metal before you learn to
assemble chairs your order online.
Best

Kai-Uwe Bux
Nov 27 '06 #94

Chris Thomasson wrote:
>
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?
Of course it is. C++ beat all the other OO languages of its generation
because it supported all the company's existing C source. Read
Stroustrup's pages about the history of the language.
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.
And then you'd need to learn assembly too plus deep amounts of
electronics to know how all the hardware works.

What if, however, you are the typical student for whom university is
really only the unfortunately necessary and costly step between school
and getting a job, and that your primary aim of university is to be
trained to get a job afterwards, especially since you'll probably have
a big loan to pay off.

And it's the "private standard" that has allowed them to advance Java
to where it is, introducing generics (really templates) in the latest
standard, plus the equivalent of a foreach which looks a lot cleaner
than the 3 C++ options of having to either
1. write a loop
2. write a functor
3. try to create a functor on the spot with some horrible looking
syntax, involving binds, addresses of member functions and possibly
some funny looking _1 symbol.

Nov 27 '06 #95
Mirek Fidler wrote:
Phlip wrote:
>loufoque wrote:
Refcounting is not the same as a GC.
>In terms of language advocacy, C++ gives you the tools to build whatever
quasi-GC system you want (including a true GC). It doesn't bend you over
and
Uh, no not really. Best you can hope for AFAIK is some sort of
conservative GC.
You are responding to someone who said "C++ gives you the tools to build any
kind of GC system imaginable".

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Nov 27 '06 #96

Phlip wrote:
Mirek Fidler wrote:
Phlip wrote:
loufoque wrote:
Refcounting is not the same as a GC.
In terms of language advocacy, C++ gives you the tools to build whatever
quasi-GC system you want (including a true GC). It doesn't bend you over
and
Uh, no not really. Best you can hope for AFAIK is some sort of
conservative GC.

You are responding to someone who said "C++ gives you the tools to build any
kind of GC system imaginable".
Ah, you mean building GC in C++ for Java? Or what?

Actually, I got impression that you suggest that you can build true GC
a library solution for C++. I argue that you cannot (at least not
without special C++ compiler, but that would be equal to adding GC to
language definition).

Mirek

Nov 27 '06 #97
"Mirek Fidler" <cx*@ntllib.org wrote in message
news:11******** *************@j 44g2000cwa.goog legroups.com...
>Java references (e.g., strong thread-safe reference counting) in C++? No
problem:

http://appcore.home.comcast.net/vzoom/refcount/
This can be used as an alternative to Boost shared_ptr, which is only
basic
thread-safe....

You got me interested. I briefly visited the site, but missed any
description on how to do that.
Well, you can't use it as a 100% drop in replacement right now because the
interface is a little different. However, it does provides two smart
pointers:
ptr::global - used for strong atomic references
ptr::local - used for basic atomic references
Here is some brief info on their semantics:

http://article.gmane.org/gmane.comp....t.devel/149813

http://article.gmane.org/gmane.comp....t.devel/149818
You can start to experiment and tinker around when them now. However, the
library is in pre-alpha status... I would not use it for production code
yet. Experiments fine, production, wait for version 1 to come out... Oh
crap, I just noticed that I am going to be a little late for a meeting!
Damn, I need a couple of pots of coffee!

Can you point me in the right direction?
I have no time to say what I want to say right now, so here are some quick
links to relevant information:

http://search.gmane.org/?query=&auth...s+thmasson---A
(deeper descriptions of how my refcount algorithm works)
http://groups.google.com/group/comp....c94118046142e8
(lock-free patents...)
http://atomic-ptr-plus.sourceforge.net/
(Joe Seighs excellent work)
http://groups.google.com/group/comp....8717d3bcdedfe9
(initial idea; pseudo-code)
http://groups.google.com/group/comp....21a151d3916592
(mostly lock-free...)
http://groups.google.com/group/comp....22ef08ae26e2f3
(async-signal-safe aspects of my algorithm)
http://groups.google.com/group/comp....7b1867c19e6288
(async-signal...)
http://groups.google.com/group/comp....e468f341a33ee2
(adding more async-signal-safety characteristics '...)
http://groups.google.com/group/comp....a46f3ef24b786a
http://groups.google.com/group/comp....63f874241bcaf4
(possible improvements... )

Other that that... When I get back from the meeting, we should include c.p.t
in this conversation.
Well, got to go!

Nov 27 '06 #98

Frederick Gotham wrote:
blangela:
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 think that a prerequisite to being a decent programmer is to have above
average intelligence. A minority of people have above average intelligence,
and so a minorty of people aspire to be an actual bonafide programmer
programming in languages such as C and C++.
No. Programming requires a certain thinking type, that is all. There
are plenty of brilliant people out there that can't program and will
never be able to program beyond the very basics.
>
For the less bright among us, there's Java.
Actually, for the less bright among us there's language bigotry.

Java programmers are not stupid. If you want to call people stupid you
should have a look at people that purposfully use the least productive
and secure components of a language when not necissary. Those that do
not make use of the tools at their disposal to make themselves more
productive and better programmers.

Nov 27 '06 #99

Alf P. Steinbach wrote:
>
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, () )).
The ideal solution in my opinion is a "one-exception-type" exception.
That would probably reduce a lot of the overhead of exceptions. You can
then examine the exception if you want to do different things based on
what the error was.
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.
So you are admitting that C++ is effectively dying as an application
programming language but will probably remain for the low-level systems
program for a non-embedded platform.

Nov 27 '06 #100

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
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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...
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.

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.