Re:Not Your Grandfather’s Perl
by jandrese on Thursday September 08, 2022 @09:28PM
(#32774233)
Perl does a kind of half JIT when you start a script. It doesn't compile fully down to native machine code, but it does parse and lex the script to build an internal representation. The code is then interpreted, but since it doesn't have to parse each line again it runs very fast and also you can interpret code on the fly in a variable so you get the best of both worlds.
[ Parent
| on HN ]
This has been the usual way to implement interpreted languages for decades; Perl isn't special in that regard. JIT generally refers to generation and execution of native code specifically.
I'm pretty sure bash still interprets line by line because you can mess up a script by editing it while it is executing.
bash (and other shells) are special in that regard, because they use textual substitution so heavily - to pass arguments etc.
But Python, Ruby etc all compile to bytecode, and have always done so as far as I can remember.