in reply to Re^3: Pre-compiled Perl?
in thread Pre-compiled Perl?

> Contrary to some other languages (e.g. shell, TCL , awk,

That's not up to date:

Since version 8.4, Tcl has featured the ability to automatically translate scripts into bytecode where feasible

from http://wiki.tcl.tk/38633

It's interesting to note that one of the main arguments why TCL lost against competitors like Perl was the bad performance.

Also what they call "bytecode" here seems to be high level opcode.

That's all not very new stuff, I'm pretty sure many BASIC dialects in the 80s already "tokenized" the source in a "parsing" phase.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^5: Pre-compiled Perl?
by choroba (Cardinal) on Apr 05, 2017 at 12:55 UTC
    > many BASIC dialects in the 80s already "tokenized" the source in a "parsing" phase.

    On Commodore 116/16 and 64, you could even program directly in the tokens. ? was print , most others were just abbreviations like fO instead of for or oP instead of open . And when you byte-dumped the memory containing the program, it contained these instead of all the commands.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      WOW!

      You know Commodore Basic was my first programming language° (on a CBM4000), and it was very surprising to find out later that other languages/Basic dialects didn't support ? for print.

      You somehow just solved a decades old miracle for me ... =D

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

      PS: or I simply just forgot in the meantime ;-)

      footnotes

      °) though I actually had GFA_BASIC in mind when talking about tokenization

Re^5: Pre-compiled Perl?
by Laurent_R (Canon) on Apr 05, 2017 at 06:14 UTC
    Interesting ++. I did not know that, thank you for the information.