[OT] perl and CLRs (.NET rocks)
Andy Armstrong
andy at hexten.net
Thu May 3 13:31:07 BST 2007
On 3 May 2007, at 10:48, Simon Wistow wrote:
> Or, thinking the other way round, what features from Perl would be
> necessary to have a minimally compatible (where minimally is a number
> defined over --> there. Somewhere.) Perl-like-language?
Funnily enough I was pondering the same question for a slightly
different reason last night. I've been working on gpsbabel[1] recently.
It's written in C. It should be written in a Perl or Python like
language - it does a ton of text processing including XML and HTML
parsing and that gets pretty ugly in places.
But then it'd be harder to distribute. For example Google Earth includes
a standalone gpsbabel binary. As far as I'm aware it would be less
convenient for them to distribute it if was written in Perl. Also it
runs on Windows without exotic dependencies that would foil many users.
So I was thinking about the useful subset of Perl that could be compiled
(via C -> gcc) into a compact stand-alone executable.
I got rid of:
tied vars
eval $string and anything that needs an interpreter at runtime -
like do $file
@_ argument aliasing - and probably other places where aliasing
occurs
typeglobs
(possibly) some types of symbol table munging
I know 'how can I make a stand-alone binary from a perl script' is a
FAQ. I think it's a question we might have been a bit sniffy about in
the past believing it to be a request to produce evil closed source code
with Perl. Working on gpsbabel has reminded me that there'd be useful
applications for a compiled Perl-like language. Applications that have
more to do with convenience than a desire to keep people out.
[1] http://gpsbabel.org
--
Andy Armstrong, hexten.net
More information about the london.pm
mailing list