3 ms·
By that argument JavaScript is also compiled, so this point is wrong no matter how you interpret it… The primary difference between a traditionally compiled la
by alwillis 4y ago
By that argument JavaScript is also compiled, so this point is wrong no matter how you interpret it…
The primary difference between a traditionally compiled language (like C) and CSS and JavaScript is C is compiled before execution and CSS and JavaScript are compiled during execution.
There’s a reason why JIT stands for Just In Time compilation [1].
[1]: https://en.wikipedia.org/wiki/Just-in-time_compilation https://en.wikipedia.org/wiki/Just-in-time_compilation
- naasking 4y agoYes I know the difference, the point is that the original poster said CSS is faster because JS is interpreted. There is no way to intrepret that statement in a way that makes sense.
- ghusbands 4y agoSure there is - some people use interpreted to mean step-by-step, as in imperative. "CSS is faster because JS is imperative" is a charitable and correct reading.
- kaba0 4y agoBut that is not correct, js is not interpreted/executed step-by-step in many cases (it is a bit more complicated, there are multiple interpreters and JIT compiler in the picture, it usually is started up by interpreting but then switched to JIT compiled native machine code). The correct difference to make is the execution model, one being basically a Turing machine while the other is more similar to logic programming languages.