There are two common ways to port software to new places. One is to
make the software run directly on the hardware of the new place. The
other is to make it run on other software that already runs there.
While the first approach has traditionally provided the most efficient
execution, Virtual Machine (VM) implementations are now increasingly
common. The idea behind a VM is to serve as a uniform, well specified
abstraction of the underlying hardware, making it possible for most
software to run on top of the VM instead of the real hardware.
The VM approach to language implementation has several advantages.
Implementations of different languages can share the same VM, enabling
language interoperability. Maintaining languages that target a VM
would also be much simpler, since the developers need not be stymied
by machine-specific issues. Other benefits include: Just-In-Time
compilation; OS-neutrality; not having to worry about issues such as
memory allocation; more robust software through automatic code
verification and security controls.
A VM can also be viewed as a machine-oriented language, as opposed to
languages like Perl which are programmer-oriented. Separating the
machine-oriented parts of software from the programmer-oriented parts
allows them to be optimized effectively and independently.
Developers currently implement Perl as an informal "virtual machine", but neither the language nor the implementation takes a VM-friendly design approach. Doing so makes it possible to retarget Perl to popular VMs, and allow Perl to benefit from independent advances in VM technology. This talk explores the potential approaches to such a VM-friendly implementation of Perl.