4 ms·
Languages aren't "optimized compiled" or "interpreted". This is nonsense classification. The words you are looking for are "language runtime". And even if you
by crabbone 3y ago
Languages aren't "optimized compiled" or "interpreted". This is nonsense classification.
The words you are looking for are "language runtime". And even if you used that, you'd still be wrong. Java is exactly that: "even if with a dynamic JIT", and it does perfectly fine and even sometimes is the fastest solution for a problem (I think Java beat everyone on fastest HTTP server with largest number of simultaneous connection, where second in class was an Erlang program iirc).
Because you don't understand the problem, you are trying to offer a wrong solution: compiling doesn't do anything to speed up programs, for example. What people who want better performance need is:
* Tools to analyze program performance.
* Tools to alter program runtime ahead of time and during the program execution.
* Access to runtime primitives as far down to the "metal" as possible with as little undue effort as possible.
---
The problems with current JavaScript runtimes are that they aren't designed for performance-minded developers. The developers are given highly engineered "primitives" to work with, which make them commit to certain solutions which in turn will make automatic or manual optimizations very hard, next to impossible.
But it doesn't have to be like that. For example, a variant of JavaScript, the version 4 a.k.a. ActionScript had an "escape hatch" -- if you wanted to optimize a program you had simple unchecked memory access with primitive memory operations, which would allow you to side-step all the "bloat" of object lifecycle management. This library was often used to implement various online tools for dealing with a lot of data-processing (eg. image or video compression) and they did just fine.
Current version of JavaScript doesn't have anything like that. But it could as the evidence of its previous version doing it successfully shows.
- pjmlp 3y agoI have a Informatics Engineering degree with major in compiler design and systems programming, thanks for the lesson regarding how languages are supposed to be.
- crabbone 3y agoWell, it just means that your study was bad... if all you have to say about the subject is that you've completed it. A competent in the subject person would've had something to say relevant to the subject. The problem is that CS studies are, in general bad. Not just your specific case. In other fields something would've pinched your bubble by now and you'd start wondering what other things you might have possibly missed, but because CS studies are so universally bad, virtually everyone you interact with professionally will share your misconceptions. Ironically, the "hard sciences" as well as math like to pet themselves on the back about how these disciplines open students to critical thinking, requiring proofs and soundness of definitions, and yet your whole taxonomy of the thing you interact with professionally is ridiculously wrong, contorted and full of magical thinking. During your studies, I'm sure, you were given a straight up definition of what a programming language is. You must've taken at least one semester of automata theory -- it's hard to imagine a CS degree w/o it. The premise of this discipline is that there are languages, and throughout the course you discuss their properties, various ways to define them, operate on them etc. And then one day you take an "intro to CS with language X 101" course. And that b/s course tells you with a straight face that language X is "object oriented" or "functional" or "compiled" or "dynamically typed". And you just eat it up. You never connect the dots between what you've studied in automata course and this intro b/s course. You never ask the question like "so how do I get from states, transitions, initial and final state to... objects?.. or w/e other b/s property the course ascribes to that language. And now you are waving your diploma in my face and making a fool of yourself... you should probably ask the academic institution who handed you this diploma to reimburse you for the time you wasted there instead. Alas, they won't do it. They won't so much as understand the reason why what they did was a disservice to you. Well... life's unfair.
- pjmlp 3y agoNah, it was obvious I would be losing my time, as the follow up answer proved.