3 ms·
I think this just shows how scientists don't understand programming. Pretty much every 'advantage' listed for Fortran over C++ could be added to C++ in an afte
by justin_vanw 9y ago
I think this just shows how scientists don't understand programming. Pretty much every 'advantage' listed for Fortran over C++ could be added to C++ in an afternoon. C++ is an extensible language, you can define your own types and operators, so all the examples can be easily implemented. For some of the examples it's just sad that they were brought up. For example, 'you have to write a loop to allocate an array' should say 'you have to write a function one time to allocate arrays and never write this loop again'.
- 4lch3m1st 9y agoI don't think that's the case, seems a little too extreme to think that. I believe the central point of someone not directly enrolled with programming as an actual job (or as a hobby taken seriously) picking Fortran over C/C++ has to do with the features it has out-of-the-box, or at least that are more apparent from the surface of language knowledge. Even if it takes one afternoon to implement a certain feature, would scientists WANT or NEED to do that? Don't get me wrong, this is probably an opinion I would defend if it were exclusively related to programmers being "too lazy to learn a new language", but this is a different learning purpose.
- justin_vanw 9y agoI can't agree, comparing two languages purely by a superficial "this one lets me write code like this out of the box" ignores everything that matters. Lets say I wanted to write a web blog server. One language has "import blog; blog.run()" and I am up and running instantly. Another language makes me install a blog library and some other side stuff, and choose a webserver. The point is it isn't just built right in. Which language is better for writing web blog software? The answer is, you have literally no idea from what I just told you. My analysis is insanely superficial and meaningless. Presumably, if I am going to spend hundreds or thousands of hours in some coding environment, what is 'built in with no effort' matters somewhat on hour 0, but virtually not at all by hour 200. Professional scientists presumably spend thousands of hours on this stuff, it's really not too much to ask that they become somewhat competent with the tools they are using.
- m_mueller 9y agolanguage built-ins are not fully replaceable with extensions and libraries. Most notably: (1) Compilers have more ways to optimize if given higher level abstractions, (2) built-ins are easier to use for the user because of specific syntax (e.g. highlighting), (3) built-ins have support in debuggers (e.g. you can easily print an array slice in a Fortran debugger). just a case in point: what do you think is easier to use, standards conformant and is more typesafe: a) a typedef that gives you "__restrict const * const double" b) declaring inputs as "real(8), intent(in)"
- justin_vanw 9y agoActually for C++ you are almost perfectly wrong. It's specifically a design goal of the language to not have the builtins be 'superior' to what you can implement yourself (well the builtins are built by world class experts, but the point is there is no bias in the language).
- m_mueller 9y agoThat's a design decision about the C++ language, but how does that make my arguments wrong?