Hacker News new | past | comments | ask | show | jobs | submit login

It is! Modern macOS, fresh install: no Python, no Ruby, but Perl is there. Git for Windows adds Bash with Perl in it. Every linux server has it. You probably can come up with some Docker image that doesn't have it installed, but it comes in as a dependency to a lot of linux software.

The cool thing is that Perl is compatible, and maintaining compatibility is the top priority for Perl developers. so, many distros keep updating it because it's very safe to do so. When many projects switched from GPL2 to GPL3 macOS famously decided to either freeze some bundled tools, switch to alternatives or removed them entirely. It took them years and years, but all this time Perl has been a notable exception.

As a result nowadays you can be very certain that every machine you run your code on has a very recent Perl installed, so you can use many new stuff, too. It's an old language, but the code you can write can be pretty modern, which is nice.

It's still Perl: lots of symbols, some variables get set up implicitly for you, some keywords look silly to modern eyes (`my` to declare a variable, `sub` declares a function). Some newish stuff is handy. Like, these days you can specify types of parameters in function signatures, and it does a rudimentary type-checking for you. And Perl regexes are still better than in ANY language out there, for 35 years and counting!




> It took them years and years, but all this time Perl has been a notable exception.

If we take Apple at their word then it's an exception only in that they haven't got round to it yet, not that it isn't also going to be culled -- the Catalina release notes mentioned Perl explicitly alongside the other two:

    Scripting language runtimes such as Python, Ruby, and Perl are included in macOS for
    compatibility with legacy software. Future versions of macOS won’t include scripting
    language runtimes by default, ...
-- https://developer.apple.com/documentation/macos-release-note...


Yep, Ruby and Python got removed very quickly from the system following this announcement. Perl, however, stays. It seems like some components of macOS depend on it and the dependency is hard to remove. It will likely happen but huge kudos to Apple for keeping it up to date meanwhile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: