Hacker News new | ask | show | jobs
by kamaal 1487 days ago
Ah Perl!

The old friend, you can always rely on to do quick scripting work. I've written non-trivial quantities of Perl in the past, and maintained other people's Perl code too. Contrary to popular opinion, I've always found it easy to maintain.

I still call upon Perl to do

    open(FILEHANDLE, $file) or die;
    while(<FILEHANDLE>){
    ....
    }
    close(FILEHANDLE)
Sort of work.

These days I do good deal of work in Python. Python itself has been heavily Perlified over the years, especially Python3. Its fame seems to have come moving away from Pythonic principles, to Perlic principles. They add lots of features, even syntactic features, libraries and even things like typing. Python isn't the small, minimal core of ecosystem anymore.

Every single release of Python gives me the Perl feel from the old days.

So I kind of don't miss Perl at all, after all we managed to turn Python into Perl.

Long live Python, Long live Perl.

3 comments

Examples? I don't recognise anything Perlish in Python. Ruby, yes, but not Python.
Use the debugger: `python -mpdb` is a very similar experience to `perl -d`, so much so that it feels like a gift from an earlier perl-to-python emigrant.

(I showed my co-workers `perl -d`, they later discovered and showed me `python -mpdb`)

I don't really see it either, but maybe a few things like collections.defaultdict (like Perl's normal associative arrays) and sysconfig (very similar to "use Config;").
f-strings are quite perlish IMV.
Indeed, and being able to invoke 'perl -ane ...' is sometimes a bliss.
If you use -E rather than -e you get some new features turned on by default, notably you can use "say" instead of "print".
the same stuff happened long time ago with ruby. I mean, not exactly the same stuff, ruby was perl-inspired from the start.

Nowadays instead of `perl -lne` oneliners I usually make `ruby -lne` oneliners, just for a chance my coworkers could make sense of them.

let's celebrate perl at least for native support of utf-8 strings before it was cool.

Python was always deeply and extremely perl-inspired.

Each line of the Zen of Python is the negation of one of the Perl's architectural principles. And when your entire identity is denying something, you can't be anything but similar to that thing.