Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I'm choosing C++.

Name: Anonymous 2016-02-01 12:48

So I went out looking for a new language. These days there are lots to choose from. There are the "new and hot" languages like Go, Rust, and Swift. Then there are the "corporate" languages like C# or Java. Finally, there are the "other" languages like Eiffel, Haskell, and Racket. Programming languages have a lot in common with religions. You can spend your life searching for the "one true" way, and either find enlightenment, or discover you were worshipping false idols.

To make a long story short, I looked into some of these languages, but eventually came back to C++. The reason was that C++11 is a much better language than old-school, C-with-classes C++. It's seems as if the language committee has been observing all the innovation going on in the world at large, and has done a great job of reacting to the times.

The new C++11 has copy and move semantics, iterators, range-based for loops, lambdas, the auto keyword, smart pointers, and a whole slew of new data structures and algorithms in the STL. These features are a boon to productivity, and I haven't even mentioned all the new stuff coming out in C++14 and C++17.

Just as an example, I managed to write 2500 lines of C++ using the more modern style of RAII and shared pointers, and there were zero memory leaks on the first try! The equivalent functionality in C would have probably been 2x the code, and an additional week studying Valgrind errors.

One thing that slowed me down was how to interface a C++ library with Python. C has cffi, and ctypes, which are both dirt-simple to use. The landscape for C++ extensions is a bit hairier. If you don't want to just write your own CPython extension, you can try using Boost Python, pybind11, or SWIG. So this adds a bit of cost, but it still seems do-able.

I want to congratulate the C++ standards committee for all the work they've been doing lately. And they're not even slowing down! The roadmap for C++17 looks like we'll get even more fantastic features, especially in the all-important areas of concurrency and parallelism.

So if you're like me and you've been ignoring C++ due to distrations from all kinds of shinier things such as Go, Rust, and Swift, I encourage you to take another look. Not only will you probably find new things to love about C++, but you might even find yourself being more productive due to seamless integration with all the C libraries you still depend on.

Name: Anonymous 2016-02-21 13:48

>>35
Most C programmers can't even into wheels.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List