Advertisement

How much life is left in C++ ?

Started by June 01, 2010 07:47 AM
72 comments, last by SiCrane 14 years, 5 months ago
Quote: Original post by Valderman
I guess it all boils down to my opinion that it's far too easy to completely circumvent the type checker in C++.

Yes, it can be done if you really need to do it. But it's not like you have to do it all the time. If you look at modern, idiomatic C++ code, you won't find a single array, pointer or new. It's just not necessary to work at that level anymore.
It's pretty nifty these threads.

You can quickly figure out which programmers forgot programming languages are just tools. I personally consider this one of the most important rules in programming. After all ANYTHING else can change in the software/hardware industry, except for the fact that they're tools.
Advertisement
"How do you propose I do the following with templates? I don't think we mean the same thing when we're talking about pattern matching."

{and then something that looks like some dialect of Prolog}



So what you're basically saying here is that C++ is no good because you can't write code in a completely different language in C++?

You should probably just go work in Prolog (or whatever it is) and not worry about everyone else. If you start getting bent out of shape about every individual stupid person on the planet you won't ever get anything done.



And anyway, these days it's scarily like you can -- boost::spirit manages to get a slightly mangled EBNF into actual compileable C++ and the Boost project seem to have done a lot of work getting LISP to do the same. The more I see of it, the more concerned I get about the sanity of those involved.

"I'm not shy about the fact that I like Haskell"

Oh is THAT what it is.

Ah, I can sleep much easier at night now; you're not a Prologger, you're just another Haskell nutter. You guys are ten a penny round here. Sometimes we have to fetch large brooms to sweep your huddled masses off the front step to be able to go in and do some work. It's all too common to have clumpy hordes of academics leaking out of the uni as their PhD ends and no proper academia beckons, each carrying nothing more than their MFTL.


And actually that bitter tune about how no-one appreciates Haskell properly and keeps communing (albeit productively) with 'The Devil That Is Called C++' is merely a variation on a fairly common theme.

Ten years ago it was LISP which was (again)[1] soon going to be the great saviour of IT if we'd just all stop producing useful products with C++/VB and get 'fully engaged' with the awe and love.

And, humourously, ten years before THAT in the late 80s and early 90s it was actually Prolog-related stuff which was going to save us all as part of the "Fifth Generation" project. Yeah!! That went swimmingly. In an alternate universe somewhere the planet is full of very intelligent AI systems running on a sort of horribly souped-up parallel MSX platform.

In this one it turned into a complete charlie-foxtrot. You know, I nearly left the IT track at that point because their PR (which was rather better than their IT) nearly had me convinced that there wouldn't be a lot of IT to do in the future.



[1] LISP was the saviour to be in the 60's and the 70's as well, before all the companies based around it imploded.
Bear in mind that there are still people that program in COBOL for a living. Similarly, there's a lot of code out there that has been written in C++, that has to be maintained, and rewriting it in the latest language of the day is not really an option (and probably won't be for a long time).

In the games industry, I don't think C++ is going to go anywhere anytime soon. I think you might see a lot of indie developers switching to languages like C# for faster development on Xbox Live Arcade, and the like, but I think C++ will be the language of choice for AAA games for some time to come.

Aside from any other considerations, a LOT of games are written using commercially available engines at the moment, most, if not all of which, are written in C++. Usually, those that don't, have their own engine and tech, which is generally based on C++. Given the choice between updating their existing tech for their next game, and rewriting from scratch, what do you think most developers are going to choose?

I don't think you'll see lots of new projects outside of the games industry being written in C++ though. (Aside from fields that involve a lot of low-level programming, like embedded stuff).
Quote: Original post by Katie
"How do you propose I do the following with templates? I don't think we mean the same thing when we're talking about pattern matching."

{and then something that looks like some dialect of Prolog}



So what you're basically saying here is that C++ is no good because you can't write code in a completely different language in C++?
No. Since the assertion was made that pattern matching can be achieved using templates I got curious and wanted to know if that was indeed the case or if we were misunderstanding each other. If you read my posts, you will see that I'm definitely not saying C++ is "no good;" I'm simply putting forward the point that the lack of one feature or another isn't an attempt to limit the programmer, but a design choice. If you feel multiple inheritance and operator overloading are extremely important that's up to you, and I'm not saying they aren't (just that to me, they aren't,) but saying that "language X doesn't have my favourite feature from language Y, so it's trying to limit the power of the programmer" is just like saying "my hammer is more powerful than your screwdriver;" they're both used to attach things to each other, in a completely different way.

Following your reasoning, didn't you previously say that other languages are no good because you can't use them to write C++?

You should try out some of these "limiting" languages some time; who knows, it just might make you a better C++ programmer, just like anyone writing managed code for a living would do well to get under the hood and have a taste of lolsegfault every once in a while and any functional programmer who doesn't know what happens to all their maps and folds at compile time is bound to write pretty suboptimal code.

Quote: Oh is THAT what it is.

Ah, I can sleep much easier at night now; you're not a Prologger, you're just another Haskell nutter. You guys are ten a penny round here. Sometimes we have to fetch large brooms to sweep your huddled masses off the front step to be able to go in and do some work. It's all too common to have clumpy hordes of academics leaking out of the uni as their PhD ends and no proper academia beckons, each carrying nothing more than their MFTL.
/../
I find your strong opinion about something which you don't know the first thing about amusing. I also find it quite interesting that you're harping on and on about how "useful" C++ is while decrying Java, C# and other languages for "limititing the power of the programmer" when in fact most any "limiting" language is used far more widely than C++.
Advertisement
As others have said, languages are tools. Using one language for everything (especially when that language is C++) is like trying to hammer nails with a screwdriver. Yes, you can probably do it, but it's not a very good idea.

Personally my three main languages are C++, C#, and Python, and I flit between them based on the situation (although to be honest, I never use C++ outside of work these days. It's too fiddly and time-consuming for home game projects or tools, compared to the alternatives)
Personally I learned C++ prior to C#. I learned C++ as my first language via the Livecode method, and I learn pretty fast . Obviously I become more efficent in advance features of C++ such as of STL, etc via experienced. Perharps it was easy for me to pick up since I had a soild IT background and logic is like second nature to me. /rant

Now as far as C++ going away any time soon, I don't see it happening. C# is pretty good for quick, non reused work , but to say it going replace C++ any time soon is a joke.
Just a wannabe grinding in this game we call Life.
Quote: Original post by agentleo
Personally I learned C++ prior to C#. I learned C++ as my first language via the Livecode method, and I learn pretty fast . Obviously I become more efficent in advance features of C++ such as of STL, etc via experienced. Perharps it was easy for me to pick up since I had a soild IT background and logic is like second nature to me. /rant

Now as far as C++ going away any time soon, I don't see it happening. C# is pretty good for quick, non reused work , but to say it going replace C++ any time soon is a joke.


It depends on what you classify as non reused work. As it is extremely easy to produce a small library and make use of it's classes using C#. I would go out on a limb and say even a novice C# programmer could make a micro library and make use of it. While the same could not be said for C++.
Quote: Original post by ExcessNeo
Quote: Original post by agentleo
Personally I learned C++ prior to C#. I learned C++ as my first language via the Livecode method, and I learn pretty fast . Obviously I become more efficent in advance features of C++ such as of STL, etc via experienced. Perharps it was easy for me to pick up since I had a soild IT background and logic is like second nature to me. /rant

Now as far as C++ going away any time soon, I don't see it happening. C# is pretty good for quick, non reused work , but to say it going replace C++ any time soon is a joke.


It depends on what you classify as non reused work. As it is extremely easy to produce a small library and make use of it's classes using C#. I would go out on a limb and say even a novice C# programmer could make a micro library and make use of it. While the same could not be said for C++.


I have four interrelated audio/video projects that I use for live performances, written in C#, sharing common code; some written over two years ago. I constantly mix & match bits of my own "library" since it's so easy to reference other managed assemblies (Literally, just Project-Add Reference and bam, all there, even in intellisense almost instantly) - so I'm not sure why C# would be any less usable than C++ for "reusable" code.

This topic is closed to new replies.

Advertisement