3 ms·
Lots of the popular languages have "eval", which can't be compiled ahead of time. Even if you did compile Javascript ahead, before delivery, what would you com
by pjc50 6y ago
Lots of the popular languages have "eval", which can't be compiled ahead of time.
Even if you did compile Javascript ahead, before delivery, what would you compile _to_? It would have been a huge uphill struggle for the smartphone era if all websites had been x86-only.
AOT compilation forces you to pick your customer hardware. JIT leaves that choice to the customer.
Mind you, there are situations where I'd quite like AOT for Python, or at least advance _linking_, as it would solve a lot of the distribution problems and virtualenv hassles.