DEV Community

Discussion on: Why programming languages are slow

Collapse
 
akygameru profile image
aky-g

Dear author,

I think that you missed the point, of the question posed in the title, entirely while building your article.
Why, you might wonder?
First, you're trying to judge programming languages from the perspective of how good looking their syntax is. This is completely subjective and has no relevance. When you work long enough with a tool, you'll get used to its looks and whatever you thought about the looks in the first place will get dulled, even to the point of becoming beautiful.
Second, you're saying that the programmers are delegating the memory management to the compiler (with languages like Java, C#, JavaScript, etc.), which is wrong. For those languages the memory management is actually delegated to the runtime environment, aka VM - which all have, making life somewhat easier, but for certain use cases extremely heavy. One language that actually performs memory management, to some extent, during compile is Rust - there might be others, but, hey, I don't know them all :)
Third, you missed the mark with JNI (or however its equivalent in other languages is called). Using those is actually very fast and is also the reason why Java was able to achieve performances close to C/C++. Sure, writing such stuff is not as easy as pouring Java code, but, after all, it's not meant for every user.
Fourth, there are books out there teaching how to write a compiler. They are a very good read, and, daresay, a must for every developer, and they can help understand in better detail and in more depth what is going on in the insides.

My answer to your question is that in 9 out of 10 cases the guilty party is the programmer. Today we have crash courses claiming to teach you to write code in a matter of hours (some are more honest and make it weeks or months), but what they actually deliver is just another code gluer. Not anyone can be a musician for example, and as such not anyone can be a programmer, although is, by far, easier to become one.

Speed is not always the most important aspect, but choosing the right tool for your work definitely is. Besides, in programming, when speed is paramount, we always have machine code :)

Collapse
 
yfchen123 profile image
yfchen123

"First, you're trying to judge programming languages from the perspective of how good looking their syntax is. This is completely subjective and has no relevance." Actually there are some languages that have horrible looking syntax that I would honestly avoid. Perl, Brainfck, Intercal, and Python come to mind.