The purpose of the P5-to-P6 translator is mostly to provide warm
fuzzies.  That's how it worked out for a2p, anyway.  People knew they
had the translator available, but mostly just translated their stuff
piecemeal by hand.  They primarily used the translator for educational
purposes--feed a bit of awk code to it and see what it spits out for
the equivalent Perl 1 code.

But you should probably not think of P5-to-P6 as a mere translator.
It's intended (eventually) to be a refactoring tool for turning N
ways of doing things into the "standard" way, and that's something
mere emulation can never give you.  In particular, OO usage needs a
lot of refactoring.  Plus popular source filters such as Switch will
need plugins to backtranslate to the equivalent Perl 6 idioms.
And all this needs to be customizable by the user requesting the
translation.

That being said, it doesn't matter how good we make the translator,
people will tend to rely on emulation forever.  And that's okay too,
as long as someone is willing to maintain the emulator, and as long
as that someone isn't me.  That's why I claimed the translation end
of it for my own.  :-)

Even the translator will have to rely on a certain amount of emulation
for constructs that don't map well into Perl 6 directly or don't have
a decent refactoring yet.  And no amount of automatic refactoring can
reliably turn incorrect code into correct code.

Larry

Reply via email to