@ColinTheMathmo ... and the speed of BASIC.
(Maybe that's unfair - I haven't used Perl for years)
"Perl is the programming language analog to vise-grip pliers:
Nearly always the *wrong* tool for the job, but wow is it useful..."
Also? Spend a few months in the bowels of Autoconf + M4 and I guarantee you'll stop complaining about Perl...
@ColinTheMathmo I developed #Perl quite a few years for a living.
This clearly showed, that the codestyle policies and their enforcement within a project/team makes all the difference for non-opionated languages like Perl.
Some of the best structured, most readable code I ever saw was in Perl - but at the same time, you can write valid Perl code which is indistinguishable from trying to #OCR paint splatters:
https://www.mcmillen.dev/sigbovik/
@ColinTheMathmo …and when it all goes wrong, there's a certain truth to this quote by Keith Bostic:
"Perl - The only language that looks the same before and after RSA encryption."
@eliasp @ColinTheMathmo BTW #Perl has two well-known tools to encourage and enforce #programming style and best practices, respectively:
• #PerlTidy: https://perltidy.github.io/perltidy
• #PerlCritic: http://perlcritic.com
Your project or team can use their reasonable defaults or further configure them to reflect and maintain the consistent application of your preferences. They also integrate with editors/IDEs, source control management, and author #testing.
@eliasp @ColinTheMathmo For the sake of technical correctness, the last OCR example given as ...
this image is recognized as the string ;E,'__', which evaluates to the string E__ in Perl
... does not evaluate to E__. In scalar context it is just the string __; in list context it is a list of two strings, E and __.
Well, it was a joke of course, but GCC can handle this:
int fun(void)
{
int my_var = 10;
register int my_int = 15;
__asm__ __volatile__(
" lock ;\n"
" addl %1,%0 ;\n"
: "=m" (my_var)
: "ir" (my_int), "m" (my_var)
);
return my_var;
}
so ... it's not straight C ... umm, or flexible, or readable ...