How many years would you give it to stay ubiquitous? I bet on 15 years
How many years would you give it to stay ubiquitous? I bet on 15 years
What concerns me even more is that it must be pretty much impossible for a beginner to pick up C++ today.
They don't need to know the complete language on day 1.
In the projects I take part on, with teams from 20 - 100 developers, you cannot know everything regardless of the language.
There certainly are issues when learning C++. But I don't think it's impossible. A major concern is the fact that there was never a centralised website collecting good information and filtering out the crap. There never was a central Tutorial or Reference.
All the knowledge is hidden in very expensive books and worst of all there are many publishers simply spitting out piles of bad C++ books.
http://isocpp.org/ and http://en.cppreference.com/w/ are a huge improvement.
Stroustrup's book is a great introduction: http://www.stroustrup.com/Programming/ I wish he'd made it freely available. A lot of programming beginners aren't happy to pay $50-$70 for a book when they can go to other languages offering great beginner tutorials for free.
And C++11 is pretty new. So of course there is a transition period with books, articles, references catching on.
haskell, python, erlang, clojure, scala, d, go, lua… take the tasks one by one. the glue is C (but something like llvm-assembly might take it's place eventually)
I really miss the ability to compile to native code in most implementations for mainstream languages nowadays.
I am looking forward to D and Rust, but it will take ages before any of them really get into mainstream.
C, well I haven't touched it since 2001.
What's your use case for it? Is it covered by .net's (often overlooked) native compilation capabilities?
If you need to make C# work in all scenarios C++ is used, then a compiler with static linkage is also required for scenarios where deploying CLR is not possible. A compiler like Bartok.
Specially if you would like to replace C++ everywhere where it is being used.
So I've learned to make use of "Worse is better" philosophy and keep using C++ for my native code needs.
- Systems programming
- Compiler development
- Being able to deliver an application without depending on a VM
Maybe. I'm currently playing lots of Kerbal Space Program, and didn't even realise it was written in C# (well, I noticed how hot it makes my laptop).
I can see for something like an FPS engine you'd want as much performance as possible, but doesn't that mean C (and increasingly CUDA and friends)? Similarly big physics number-crunching tends to be in fortran, sometimes with python to glue it together.
- Systems programming
As in kernels? Linux famously uses pure C.
- Compiler development
Does that need to be C++? I believe most if not all of the Java compiler is written in Java.
- Being able to deliver an application without depending on a VM
Why would that ever be a requirement? What's the difference between a VM and a runtime library (which even C has)?
C++ might sometimes be the best choice, but I don't think it's the only option for any of these cases.
That says it all
> Does that need to be C++? I believe most if not all of the Java compiler is written in Java.
Depends which compiler you mean. Oracle's is a mix of C++ and Java.
> Why would that ever be a requirement? What's the difference between a VM and a runtime library (which even C has)?
They are not several megabytes in size.
You seem to like C, fine for you.
I won't touch C again unless one of my customers requests me to.
Clang, GCC already moved to C++.
Haiku, Symbian, z/OS, Mac OS X drivers and many parts of Windows kernel are written in C++.
Similarly, Windows was written primarily in C, as it predated C++. Their compiler was extremely buggy and had only partial support of features in C++98, so the vast majority of the code in Windows is C with Classes. (Unless there's been a lot of rewritten code in the last 15 years or so.) Again, not exactly a positive example.