On 10/18/2012 09:02 AM, Darren Duncan wrote:
> Something (PyPy et al) got me wondering, is it a goal in the Perl
> community before too long to have a (compiling) implementation of Perl 6
> written entirely in Perl 6?
A fair amount of the two major Perl 6 compilers, Rakudo and Niecza, are
already written in Perl 6.
Both also contain runtime code written in the "native" underlying
language (C/C#), and plans to get rid of that are not realistic right now.
Currently the code generated for Perl 6 code simply can't compete
speed-wise with hand-written C or C# code.
> (Maybe the all-Perl-6 version would also eventually be able to
> produce the fastest running Perl 6 programs too, because it is easiest
> to write Perl 6 analysers/optimizers/etc in, corresponding to PyPy as I
> understand it.)
But since we are still far away from the point where Perl 6 runs faster
than C/C#, we would sacrifice much performance by moving to an all-Perl
6 implementation. So we don't.
Rakudo got rid of much PIR code in the last months, and mostly replaced
it with NQP, which is a subset of Perl 6 (NQP = Not Quite Perl), which
makes it far more hackable. For example the whole code generation is now
written in NQP.
The priorities for most compiler hackers is to provide good compilers
over complete bootstrapping, and I guess most users agree with that goal.
Cheers,
Moritz