C++ vs Fortran

I agree with everything said in this article: My Corner of the World: C++ vs Fortran.  I especially like the bit contrasting someone trying to learn C++ for the first time in order to do some basic linear algebra (like a matrix multiplication).  Of course, in Fortran, this is a built-in part of the language:

matrix_c = matmul(matrix_a, matrix_b)

Whereas, for C++:

The bare minimum for doing the same exercise in C++ is that you have to get your hands on a library that does what you want. So you have to know about the existence of Eigen or another library. Then you have to figure out how to call it. Then you have to figure out how to link to an external library. And the documentation is probably not that helpful. There are friendly C++ users for sure. It’s just that you won’t have a clue what they’re telling you to do. They’ll be telling you to set up a makefile. They’ll be recommending that you look at Boost and talking about how great it is and you’ll be all WTF.

And before you use that C++ library, are you really sure you won’t end up with a memory leak? Do you even know what a memory leak is?

Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *