The "Perl couldn't run well on Java/.net" is a meme I've certainly believed and bought into, and a lot of other smart people have done as well. Perl is a sufficiently different language - loose typing to being with - from the languages that .net is typically concerned with (and definitely not like Java) that it's quite a believeable story.

Jim Hugunin presented a paper at PyCON 2004 well worth a read: it's called IronPython: a fast Python implementation for .net and mono (mono, if you don't know, is the implementation of .net written by the Ximian folk at Novell and others, and runs on GNU/Linux among other platforms). His paper, backed up by some real code, shows that actually, contrary to intuition, .net can host a dynamic language with some reasonable turn of pace. You can't get the code from ironpython.com, it's highly unlikely to be production ready, but appears to be roughly complete and produces fully managed code.

If Python, why not Perl? There are a number of reasons why Perl would be slightly more difficult to pull off; the big one is probably the difficulty of writing a Perl parser. However, this is a similar challenge to that being taken up by Ponie (Perl On New Internals Engine), which doesn't write a new parser, merely makes perl emit parrot. It might be reasonably possible to use Ponie as a front-end to .net as well as Parrot, although there is a still an issue (Parrot is a register-based VM, .net is stack based). Or perhaps a system to translate Parrot bytecode to and from .net would be more useful.

I would personally love to be able to target .net with Perl. But, then, I'd also like to be able to target Java and Parrot - it's really just an added ability, rather than something I'd require. It's a nice-to-have. However, it would be terribly cool.

I leave you with the wise words of Charles and David:

Any old iron, any old iron, any any any old iron
You look sweet, talk about a treat,
you're lookin' dapper from your napper to your feet
Dressed in style, brand new tile, your fathers old green tie on
But wouldn't giver you tuppence for your old watch back
Old iron, old iron

In short, it would be an interesting exercise to explore how Perl might interact with .net. IronPython has shown that the intuition isn't necessarily correct, it would be interesting to see how well Perl can be implemented. And whether or not the new clothes would be worth wearing.


In reply to IronPerl for Java/.net by kal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.