in reply to Re: Assembly language
in thread Assembly language

I'd rather the op-code the machine code of an theoretical "Perl CPU"

The C-macros are more alike ASM macros helping abstracting away complicated concepts, like variable types.

The whole comparison is quite wobbly because Perl is many abstraction layers away from machine code.

But also technologies like

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^3: Assembly language
by jcb (Parson) on Dec 16, 2019 at 23:24 UTC

    While the implementation sits several layers up the stack from the actual hardware, perl is a VM implementing a specialized processor optimized for running Perl code. I vaguely recall a quip somewhere in the XS documentation along the lines of "Real Programmers can write assembly in any language" referring to the macros used in XS code.

    It is hilariously far into the CISC category, but there is a CPU architecture in there. Think of perl itself as microcode...

      I've heard many times that the op tree is only almost an AST and the run time engine is only almost a VM.

      One says that's because a lot of external stuff was hooked into it and some state conditions are not intrinsic.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice