[mercury-users] Leveraging Perl

Ralph Becket rbeck at microsoft.com
Thu Apr 26 21:25:59 AEST 2001


[Disclaimer: people on this mailing list know my opinion of Perl.]

> The amount of free modules available from the Perl community is
> staggering. I have often longed to simply drop Perl and become a
> Mercury expert, but for pragmatic reasons it may be better to marry
> the two. What would be the best way to take advantage of Perl
> functionality within Mercury?

A big sign saying "Noooooooooooooooooooooo!" :)

Well, you can call Mercury binaries from Perl scripts and probably
vice versa.

> The two general approaches would be a Perl-to-Mercury compiler or
> some sort of C interface to the Perl interpreter.
> 
> The problem with a compiler is that Perl code is by-and-large
> less-typed than Mercury code.

One of the key motivations behind the Mercury design is to provide a
safe, declaratively pure programming tool suitable for programming in
the large.  This is diametrically opposed to the Perl philosophy.  I
suspect that any attempt to marry the two would end in tears.  For me,
the real question is what is it that you can do in Perl that you
cannot currently do in Mercury?  If the main argument is a desire to
exploit the Perl libraries out there from Mercury then the new .NET
stuff may well make this possible.

Quite how Mercury would talk to Perl is not clear, what with Perl's
"is it a list?  Is it a hash table?  Is it a scalar?  What number 
were you thinking of first?" approach to object behaviour.

Cheers,

Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list