back

by MrBuddyCasino·12y ago·view on hn ↗
In case anyone missed the Java results, I do think it is worth mentioning that it is very competitive:

"Our fourth result is that Java imposes a speed penalty of 110 to 169 percent. Given the similarity between Java and C++ syntax, there does not seem to be an obvious advantage for choosing Java unless portability across platforms or the wide availability of Java programmers is an important factor."

2 comments
There are legions of reasons to choose Java over C++, or vice-versa, none of which have anything to do with syntax. Is this a strawman on the part of the authors, or are they unaware of the legion of things that make C++ a far more complex and dangerous language than Java? Or are those things irrelevant to the needs of economists?
It is a very un-scientific study, done by non-programmers with little knowledge about programming in general. To them, syntax may seem like a big deal... just because they are ignorant to the languages other advantages or disadvantages.

As you noted, there are a plethora of reasons to choose either Java or C++...

I think it's a combination of unawareness and irrelevance (or perceived irrelevance): many economists are essentially running simulations on a workstation, and that's the use case of the paper.
In my professional life I have rarely (if ever?) seen a language chosen on the basis of it's syntax.
It's true, most good programmers won't choose a language based on just syntax. And even though most economists aren't good programmers (in my experience), they're still smart people who can see past the syntax.

The paper is probably misusing the term syntax though. C++ and java really are quite similar in many ways, far beyond just syntax, java just letting the programmer forget about some annoying things like memory management and portability. If most of what they're doing in the language is numeric analysis, then there probably isn't much of a difference at all, and they will probably get slightly better performance from C++.

Plenty of people claim they won't use Python for its whitespace. Not quite the same, but it seem that elements of syntax are influencing peoples decisions.

I would also recommend Python to new programmers, partly for the syntax.

I get what you mean, but lots of languages have seen limited popularity due to their unfamiliar or odd syntax (e.g. lisp).