More work on emitting Perl 6 from Java

philcrow on 2007-06-09T16:20:18

I can't claim to have done a lot this week. But, I did create a factory mechanism for generation so you aren't tied to how I turn ASTs into Perl 6 code.

I also started work on the command line tool. It closely mimics the two operative tests. It needs more features and has no POD.

There is one issue I need to resolve for classes. Currently, I'm correctly generating interfaces. But, classes are slightly different.

For interfaces, I've decided that roles are the proper Perl 6 structure. That can't exactly work for classes. They need constructors, which roles are not allowed to have. Probably Java interfaces will become Perl 6 roles, while classes will map to classes.

Even if I decide to use Perl 6 classes for Java classes, I still have to figure out how to handle constructors in Perl 6. That will take some more study on my part. I'm not comfortable with sub method BUILD etc. yet.

Phil