Re:Perl 11
by jlarocco on Tuesday October 23, 2018 @07:08PM
(#18288302)
Or just transpiling into C...
[ Parent
| on HN ]
Re:Perl 11
by hardwaresofton on Tuesday October 23, 2018 @08:08PM
(#18288585)
True -- I thought rust just because it's what I write in lately (and some of it's benefits over raw C) but this would be equally true, C/C++ would make just as much sense.
BTW over in the land of things-that-maybe-shouldn't-be-things:
I don't think you can transpile Perl. Maybe a subset. https://www.perlmonks.org/index.pl?node_id=663393
Re:Perl 11
by willthechill on Thursday October 25, 2018 @11:10PM
(#18306458)
RPerl is a Perl 5 transpiler. We started with a low-magic subset of Perl 5, and are now slowly moving into the medium-magic parts of Perl 5 like regular expressions and Moo(se) and databases etc.
See B::C and B::CC, the compilers to static C. Also called the perl-compiler.
B::C just jumps into the libperl run-time, but B::CC even tries to optimize away many slow run-time functions, because it knows much more about the code and data.
perlcc compiles your perl code into native code and runs it. It's very stable, because I'm maintaining it, and it's used in production.
you can't do this without type information