news.only-4-geeks.com Forum Index » C++ | Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 Next |
|  | Future of C++ |  | |
| | | Abhishek |  |
| Posted: Mon Aug 04, 2008 9:57 pm Post subject: Future of C++ |  |
| |  | |
Hi All, This is a non-technical off topic post, so please excuse me for that.
I wanted to understand from the Gurus of C++ out here about their opinion on the future of C++. I have spent eight plus years in the software industry working in applications programming on C++/ Windows. My current company is now moving big time towards Java/ J2EE based technologies. Most of the other companies which are writing application software are also moving (or have alreadt moved) to J2EE or to .Net. So is there no future for C++ in application software? What do the people on this group feel about it?
I understand that Systems side and Embedded are still the areas where C++ is being used well. But is that all? What do the people who have invested time and energy in C++ should do? Learn Java or C# because a significant majority of other developers (apparently) could not free the pointers and found garbage collector to be a great idea.
Thoughts/ Suggestions/ Criticism?
Regards Abhishek
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Mathias Gaunard |  |
| Posted: Tue Aug 05, 2008 5:28 am Post subject: Re: Future of C++ |  |
| |  | |
On 4 août, 23:57, "Abhishek" <nospam_abhishekpan...@yahoo.com> wrote:
| Quote: | Hi All, This is a non-technical off topic post, so please excuse me for that.
I wanted to understand from the Gurus of C++ out here about their opinion on the future of C++.
|
The future is decided by the ISO standardization committee. You can go and look at their working papers, they're open. The next standard is expected to arrive in a few years, with some parts already implemented in some compilers, such as GCC.
| Quote: | I have spent eight plus years in the software industry working in applications programming on C++/ Windows. My current company is now moving big time towards Java/ J2EE based technologies. Most of the other companies which are writing application software are also moving (or have alreadt moved) to J2EE or to .Net. So is there no future for C++ in application software? What do the people on this group feel about it?
|
I personally use C++ because I think it's a fairly well-designed language, that can as safe as any while still having a backdoor for when you want to use tricks, and that doesn't add overhead when you don't need it. I especially like being able to abstract anything as values (redefine copying, moving, assignment, construction and destruction) and its deterministic destruction system coupled with exceptions makes it the best language to deal with resources in my opinion. Also, C++ can do meta-programming and limited forms of static reflection, which makes it one of the most interesting generic programming platform.
| Quote: | I understand that Systems side and Embedded are still the areas where C++ is being used well. But is that all?
|
As far as I know, the game development community uses it a lot, albeit not a very modern dialect (I clearly said from my experience it's ugly, hacky and C-ish in another thread).
Apart from that I don't know about any stereotypical part of the industry that makes use of it. Like with most languages, some use C++, some don't. It's a matter of taste, of existing work that can be reused, of efficiency...
| Quote: | What do the people who have invested time and energy in C++ should do? Learn Java or C# because a significant majority of other developers (apparently) could not free the pointers and found garbage collector to be a great idea.
|
"Free the pointers"? What kind of C++ have you been using? C? In C++, you certainly do not need to manually free resources. You have RAII for that, which is much more robust than garbage collection. Pointers shouldn't be used at all in my opinion.
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Jurko Gospodnetić |  |
| Posted: Tue Aug 05, 2008 2:23 pm Post subject: Re: Future of C++ |  |
Hi Mathias.
| Quote: | Pointers shouldn't be used at all in my opinion.
|
Hmmm... maybe I'm taking this sentence out of context but... seems rather harsh does it not?
Until somone invents an 'assignable reference' (i.e. a pointer that is never null) I do not think it is possible to program without pointers. And, sometime you really want to have a 'reference variable' that points to nothing, which is something you can do only with pointer or additional variables and more complex code.
I guess you meant - there should be no need for manual heap based memory deallocation in application code. There must be some in library/infrastructure code of course...
Best regards, Jurko Gospodnetić
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Rafał |  |
| Posted: Tue Aug 05, 2008 2:24 pm Post subject: Re: Future of C++ |  |
Abhishek wrote:
| Quote: | time and energy in C++ should do? Learn Java or C# because a significant majority of other developers (apparently) could not free the pointers and found garbage collector to be a great idea.
|
Good C++ do need marketing.
There are GC's for C++.
No need to "free pointers" in C++, just user boost shared_ptr/weak_ptr or others (or GCs).
Apparently the people you describe should 1. get a clue 2. learn modern C++.
As I said... C++ used correctly (with boost etc) do need some marketing.
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Guest |  |
| Posted: Tue Aug 05, 2008 2:28 pm Post subject: Re: Future of C++ |  |
| |  | |
On Aug 4, 10:28 pm, Mathias Gaunard <loufo...@gmail.com> wrote:
| Quote: | The future is decided by the ISO standardization committee.
|
Sadly, no. They have a great deal of influence, but if the industry moves away from it, there's nothing they can do to prevent its demise.
On Aug 4, 10:28 pm, Mathias Gaunard <loufo...@gmail.com> wrote:
| Quote: | "Free the pointers"? What kind of C++ have you been using? C? In C++, you certainly do not need to manually free resources. You have RAII for that, which is much more robust than garbage collection. Pointers shouldn't be used at all in my opinion.
|
As you, I can't speak for the entire industry, but sadly my impression is similar to Abhishek's. At the software engineering career fair I went to in school before I obtained my current job, most were working in Java. At the company I currently work at, several years ago the majority of the code was in C with classes / hackish C++ code. Now it's mostly Java.
When I talk to people in my company, there are several reasons for this trend towards Java in our company.
Firstly, Java is actually platform independent. We compile and sell our code on pretty much every server platform there is. HP-UX, windows, linux, unix, etc. Java actually works on all of them with very little effort on our part, whereas some of these systems have outdated C++ compilers. Each of the C++ compilers has their own little quirks, especially with newer features, like templates and exceptions. I appreciate open source software, but sometimes I wish a "benevolent" company like Sun owned the copyrights to C++, and they ran it like they do Java. If you advertise yourself as Java X, and you're not Java X, they'll sue you, like they did to Microsoft. It enforces everyone to actually follow the standard. As of this writing, I don't know any compiler which actually follows the entire standard. Comeau is close, but I think they still have one or two minor problems. (There was a thread here a little while ago about some template problem which Comeau and Visual Studios had.)
The second most important reason is the belief that most programmers have a higher productivity in Java, and specifically, they'll write code with less errors. Sadly, I again might have to give this point to the Java people. Most of the errors result in memory issues, and garbage collection removes this problem. I really like RAII, but the bugs in a program tend to be memory related, so the Java code s probably less buggy with its garbage collection, built in bounds checking, null pointer checking, etc.
Another thing they claim is that there are more free third party libraries to use written in Java than C++. Analogous is their liking for built in Java libraries, like regular expressions, xml, zip utilities, asynchronous / simultaneous IO, etc. Threading, for example. I am definitely glad the new standard will add threading to the standard c++, but how long will it take for all compilers to actually support it? 5 years? And all of those obscure systems that we support? I don't know how well maintained their C / C++ compilers are.
The last reason is the, possibly mistaken, belief that most / all programs written in Java are about as fast as C++. For certain applications, I can give this to them. However, our company does number crunching, and other data intensive work, which is one of those areas which I think it's generally accepted by the Gurus that C++ is faster, significantly.
Overall, for C++ to survive IMHO, compiler writers need to actually follow the standard. They do, eventually, but people are moving to Java in the meantime, and basic libraries must be available, like threading. Without these, I still see very performance critical applications still written in C++, like games, but a vast amount of other programs will move to Java, and that makes me sad, because I really like C++.
The other thing which would help is if people actually knew the correct idioms for C++. Writing good C++ code is not that error prone, but most of my colleagues write C With Classes code, because they don't know any better. I'd like to think the education I've received was one of the better ones in the US, but even then, RAII was not mentioned. Argument dependent lookup was not mentioned. Very critical concepts were left out. One learns about this only when going out on your own, or if you happen to be in one of the more knowledgeable companies.
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | HumbleWorker |  |
| Posted: Tue Aug 05, 2008 2:28 pm Post subject: Re: Future of C++ |  |
| |  | |
On Aug 5, 10:28 am, Mathias Gaunard <loufo...@gmail.com> wrote:
| Quote: | "Free the pointers"? What kind of C++ have you been using? C? In C++, you certainly do not need to manually free resources. You have RAII for that, which is much more robust than garbage collection. Pointers shouldn't be used at all in my opinion.
|
{ Edits: quoted clc++m banner removed. It's /automatically/ appended to every article, including this one, and thus, does not need to be quoted. -mod }
Hey !
C++ is a philosophy. You cannot really understand other languages without knowing C++. Then, C++ has a productivity un-paralleled elsewhere. .NET/Java can be good for small scale applications but large scale applications are invariably written in C++. You are forced to depend on somebody to write a .NET/Java wrapper before you can come out with a product. With C++ you have a tremendous freedom to design your appication. Yes, there is one thing, if you think you can be productive and efficient with raw C++, then you are wrong. You do need to have your own API wrappers around common tasks which your area of specialization requires.
Languages have come and gone, will continue to come, but C++ has stayed on the scene. I cannot think of a software world without C++. No OS can afford to expose APIs without caring for C/C++. You have Symbian, you have UNIX, you have Windows, and many more, but they cannot afford to ignore the common language called C++. Can you, for example, fathom a world without the English language ?
I have been a C++ programmer ever since, and till today companies approach me for writing their solutions in C++, when they have hosts of programmers in VB/Java/.NET on their rolls, because the performance of C++ compells them.
TO MY FRIEND ABHISHEK: Please hang on with C++, the demand supply theory says you can earn more if lesser people stay in competition.
HW
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Francis Glassborow |  |
| Posted: Tue Aug 05, 2008 5:06 pm Post subject: Re: Future of C++ |  |
| |  | |
Jurko Gospodnetić wrote:
| Quote: | Hi Mathias.
Pointers shouldn't be used at all in my opinion.
Hmmm... maybe I'm taking this sentence out of context but... seems rather harsh does it not?
Until somone invents an 'assignable reference' (i.e. a pointer that is never null) I do not think it is possible to program without pointers. And, sometime you really want to have a 'reference variable' that points to nothing, which is something you can do only with pointer or additional variables and more complex code.
|
Pointers are a low level feature that are necessary to a language such as C++ that aims to be a broad spectrum language including close to assembler level programming up to highly abstracted application level programming.
However naked pointers are largely unnecessary at application level. Almost always pointers should be encapsulated into some higher level library type.
-- Note that robinton.demon.co.uk addresses are no longer valid.
[ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Guest |  |
| Posted: Tue Aug 05, 2008 5:28 pm Post subject: Re: Future of C++ |  |
| Quote: | I understand that Systems side and Embedded are still the areas where C++ is being used well. But is that all?
|
Hi,
Look around you: how many electronic devices do you see? Chances are most of them are some kind of embedded system. My guess is that it won't be long before the number of embedded systems programmers becomes comparable to that of, say, programmers working on shelfware. And I think I even remember seeing somewhere that the industry is exactly were C++ is gaining market share [citation needed].
So my guess is that C++ skills will still have value for some time.
Cheers,
Carl
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Jiang |  |
| Posted: Tue Aug 05, 2008 5:28 pm Post subject: Re: Future of C++ |  |
| |  | |
On Aug 5, 2:28 pm, Mathias Gaunard <loufo...@gmail.com> wrote:
| Quote: | On 4 août, 23:57, "Abhishek" <nospam_abhishekpan...@yahoo.com> wrote:
|
First, I am not Guru as you expected, but
| Quote: | I wanted to understand from the Gurus of C++ out here about their opinion on the future of C++.
|
I think Gurus here were tired of answering this kind of questions and perhaps you won't get their opinions anymore :-)
| Quote: | The future is decided by the ISO standardization committee. You can go and look at their working papers, they're open. The next standard is expected to arrive in a few years, with some parts already implemented in some compilers, such as GCC.
|
According to Abhishek's post, this is irrelative at all.
Also please note in the sense of "language's life cycle", no one can decide the future of C++ language.
| Quote: | I have spent eight plus years in the software industry working in applications programming on C++/ Windows. My current company is now moving big time towards Java/ J2EE based technologies. Most of the other companies which are writing application software are also moving (or have alreadt moved) to J2EE or to .Net.
|
Would you please give a list of "the other companies" ?
| Quote: | So is there no future for C++ in application software? What do the people on this group feel about it?
|
So please define "no future".
In the middle 90's of last century, it is said Java will kill C++ easily within just 2 years.
It is false, obviously.
| Quote: | I personally use C++ because I think it's a fairly well-designed language, that can as safe as any while still having a backdoor for when you want to use tricks, and that doesn't add overhead when you don't need it. I especially like being able to abstract anything as values (redefine copying, moving, assignment, construction and destruction) and its deterministic destruction system coupled with exceptions makes it the best language to deal with resources in my opinion. Also, C++ can do meta-programming and limited forms of static reflection, which makes it one of the most interesting generic programming platform.
I understand that Systems side and Embedded are still the areas where C++ is being used well. But is that all?
|
IMHO, find what C++ can not do is easier.
| Quote: | As far as I know, the game development community uses it a lot, albeit not a very modern dialect (I clearly said from my experience it's ugly, hacky and C-ish in another thread).
|
Things changed quite a lot these days. Take a look at engines like Ogre, Irrlicht, cs, bullet, wildmagic... please.
| Quote: | Apart from that I don't know about any stereotypical part of the industry that makes use of it.
|
For a very short list: LINK
| Quote: | Like with most languages, some use C++, some don't. It's a matter of taste, of existing work that can be reused, of efficiency...
What do the people who have invested time and energy in C++ should do?
|
Learning Java or .Net if it is the best tool for your job at hand. I don't see any reason that your C++ background will be an obstacle. On the country, I believe you will find the switching it is easier. (Not true for the reverse )
| Quote: | Learn Java or C# because a significant majority of other developers (apparently) could not free the pointers and found garbage collector to be a great idea.
|
Or, show them the Boehm garbage collector?
So you see the degree of freedom is different. Add garbage collection to C++ language is possible, however I don't believe you and run your great cross-platform Java programs without JVMs.
BTW, Java, together with .Net are not merely a programming language. They are also religions/weapons. C++ language does not have such a property.
| Quote: | "Free the pointers"? What kind of C++ have you been using? C? In C++, you certainly do not need to manually free resources. You have RAII for that, which is much more robust than garbage collection. Pointers shouldn't be used at all in my opinion.
|
For both educational and technical aspects, the above statement is too strong in my mind.
Jiang
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| | | Mathias Gaunard |  |
| Posted: Tue Aug 05, 2008 9:28 pm Post subject: Re: Future of C++ |  |
On 5 août, 16:23, Jurko Gospodnetić <mang...@to.avoid.spam> wrote:
| Quote: | Until somone invents an 'assignable reference' (i.e. a pointer that is never null) I do not think it is possible to program without pointers.
|
Resetable references are different from pointers. A resetable reference is always initialized from an object it must reference and doesn't allow pointer arithmetic.
That enough makes it much safer than pointers, and a good reason to use them instead.
| Quote: | And, sometime you really want to have a 'reference variable' that points to nothing
|
Do you mean like an optional object? Just take an optional<T>, or a variant<T, null_type>.
-- [ See LINK for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
| |
| Page 1 of 16 .:. Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 Next | |
|
|