tags:

views:

1564

answers:

8

I'm a bit disappointed that there doesn't seem to be any effort to make Perl a first-class citizen of the .NET world.

I've read a few 'reasons' in the past, but I don't see why they can't be overcome (different garbage collectors, hard-to-parse syntax, part of CPAN modules couldn't be ported, different communities, ...).

Activestate has a Perl.NET product but it's a hack (in the good sense) around a standard interpreter and some syntactic sugar to interoperate with .NET assemblies.

A few years ago they stopped their Visual Studio integration of Perl citing lack of interest. That was a while ago, before all the changes to .NET to make it more 'dynamic'.

Am I the only one who yearns for IronPerl?

+11  A: 

I feel your pain. There are plenty of times where I've wished for Perl's features in .NET, especially when it comes to text type files. However, I've been lucky in that the mantra 'right tool for the right job' has allowed me to use Perl at its best, and not worry about integrating it into .NET applications.

Edit: Having Strawberry Perl has been far more of a boon for me, and allowed me to call most Perl scripts from my Applications when needed, and not worry about direct integration.

George Stocker
+3  A: 

Apparently it's not that hard to write a new .NET language.. I remember reading that LOLCODE was coded on a plane trip to a conference. On the other hand, Perl has a LOT of things that need to be implemented in order to be anywhere near compatible.

Jimmy
I wrote LOLCode.net, and I'm sorry to say it wasn't on a plane. It is indeed pretty easy to add a new language for .NET, though, depending on the complexity of the language and how well it matches the .NET way of doing things.
Nick Johnson
I was thinking of the ad-hoc DLR implementation Martin Maly did for the DLR demo at TechEd.
Jimmy
Ah, right. Never mind, then. :)
Nick Johnson
+4  A: 

And while we are at it, why no JPerl (along the lines of Jython and JRuby)?

Thilo
Bradley Kuhn's thesis was titled "Considerations on Porting Perl to The Java Virtual Machine" ( http://www.ohiolink.edu/etd/view.cgi?acc_num=ucin983387768 ).
Max Lybbert
+8  A: 

Perl 5 being underspecified is another problem. The situation is a bit better than it used to be, but in many cases the only way to know how something would work in Perl is to try it in perl.

Leon Timmermans
I don't know if this is really a problem. The 120 thousand unit tests that come with the core libraries *are* the specification at this point.
Robert P
+5  A: 

Parrot has (or at least had) a project to do this. You can read an overview document.

Max Lybbert
There's an updated list of languages at https://trac.parrot.org/parrot/wiki/Languages. 'dotnet' is listed as dormant, but I *think* there's been some activity on it recently.
Gaurav
Thank you, I'll edit my link.
Max Lybbert
This Parrot project is the reverse of what was asked for - it takes .Net bytecode and translates it to Parrot bytecode to run .Net code inside Parrot, not Perl inside .Net.It also is dormant and unchanged since March 2009 or earlier.
LeBleu
First, pointing out that the project became dormant three months after I wrote the response is interesting and important to people who come later, but hard to use as a point against the original answer (especially when the answer does imply that the project is dead -- see the parens in the answer).Second, AFAICT, the question asks about interoperating between Perl and .Net. Although it implicitly refers to IronPython, which runs Python in .Net, it does not specify how that interoperability should be acheived.
Max Lybbert
+2  A: 

I believe most of the .NET languages are parsed using straightforward Lex/Yacc combination.

But Perl, as a context-sensitive language, can't be parsed using a simple lexer/parser. This partly explains the origin of the phrase "only perl can parse Perl", and also explains why Perl autoindenters and code analyzers range in quality from terrible to laughably awful.

Juliet
Both C# and VB have specialized parsers. VB is particularly bad because it has to context switch back and forth between VB and XML.
Jonathan Allen
Parsing is actually straightforward: perl uses bison. It's the tokenizing that has all the magic.
ysth
derobert
+1  A: 

Too much exploded whale guts (link).

Evan
Great read =) 1up!
Eyvind
+2  A: 

Because nobody's written it. If you want it, write it. It's just programming.

jrockway