| ▲ | pavel_lishin 2 hours ago |
| I'm having to pick up some perl now, and while I don't interact with the community, it surely _feels_ like it was written by wizards, for wizards. Obscure, non-intuitive oneliners, syntax that feels like it was intentionally written to be complicated, and a few other things that feel impossible to understand without reading the docs. (Before everyone jumps on me - yes, as a developer, I should be able to read documentation. And I did. But until I did so, what the code was doing was completely opaque to me. That feels like bad language design.) Some of it I recognize as being an artefact of the time, when conciseness really mattered. But it's still obnoxious in 2025. The whole thing reminds me of D&D, which is full of classes & spells that only exist in modern D&D because of One Guy who happened to be at the table with Gygax, who really wanted to be a wuxia guy he saw in a movie, or because he really wanted a spell to be applicable for that one night at the table, and now it's hard-coded into the game. |
|
| ▲ | phil21 2 hours ago | parent | next [-] |
| It’s interesting to me how brains work. Perl has always “flowed” for me and made mostly intuitive sense. Every other language I’ve had to hack on to get something done is a struggle for me to fit into some rigid-feeling mental box. I understand I’m the weird one, but man I miss Perl being an acceptable language to pound out a quick program in between “bash script” and “real developer”. |
| |
| ▲ | pavel_lishin an hour ago | parent [-] | | Was Perl one of your first languages by any chance? I freely admit that I've only been poking at it for a few months; maybe by this time next year, I'll be boggled at the comment I left, like it was written by a different person. > in between “bash script” and “real developer”. One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!" | | |
| ▲ | phil21 18 minutes ago | parent | next [-] | | Yep, first language I learned. And since I was somewhat early to the Internet thing, I found IRC when I was about 14 years old and actually learned from a lot of the folks who have authored books on Perl or are at least (were) well known in the community. It certainly was the major factor in how I connected the dots! Haven’t really thought about it until now, but I suppose having Larry Wall and Randal Schwartz telling you to RTFM guides your early development in a certain manner. I certainly have never considered myself a developer or programmer though. I can pick up enough syntax to get a quick hack done or start a MVP to demo my ideas, but I leave the “big boy” dev stuff to the professionals who can run circles around me. | | |
| ▲ | alsetmusic 14 minutes ago | parent [-] | | Not the person you replied to, but I thought the same thing. Perl was my first as well, and it certainly shaped the way I think about coding. It made Python feel too rigid and Ruby feel familiar. There's something to be said for the restrictions of an environment when you're learning how to operate in a domain that seems to shape future thinking. I'm sure there are people who started in a language and later found something that made more sense. I'm just reflecting on what I've found in my experience. |
| |
| ▲ | asa400 12 minutes ago | parent | prev [-] | | > One of my coworkers gave me some great perspective by saying, "at least it's not written in Bash!" I wish bash was the thing that was dying. As an industry, we need to make better choices. |
|
|
|
| ▲ | altairprime 2 hours ago | parent | prev | next [-] |
| > Some of it I recognize as being an artefact of the time, when conciseness really mattered It was an artefact of bursting out of those constraints, but honoring them still. The roots of perl as a “more capable, less restrictive” sed/awk means that it must support `perl -pi.bak -e oneliner file`, just like sed did — and so from that core requirement forward, everything it did, does. By the heyday of Perl5 era, conciseness was not a requirement, but the sed-compat roots remained a focus of the language’s creator. |
|
| ▲ | tasty_freeze an hour ago | parent | prev | next [-] |
| It isn't bad language design that you need to study the language before you can use it. I look at haskell programs and it looks mysterious to me because I haven't spent any time studying it, but I'd not thing to say it is bad language design. Yes, one can write obscure perl code and some love perl golfing. In the same way there is an IOCCC which delights in unreadable code, it doesn't mean that the C language should be relegated to the dustbin. The answer is to write readable code, no matter which language is in use. |
| |
| ▲ | pavel_lishin an hour ago | parent | next [-] | | But I can look at most Python code and be able to understand what it does. With perl, I have to look up so much. - Why is there a `1;` on a single line in the middle of this file? - What is `$_`? - This parallel execution manager doesn't actually seem to define what code needs to run in parallel in any specific way, how does this work? - What is this BEGIN block at the start of this Perl file? Why is that necessary? - What's going on with qx, qw, qq? - What does chomp do when it's just on its own line, with no arguments given to it? | | |
| ▲ | tasty_freeze 25 minutes ago | parent | next [-] | | Again: python syntax is more akin to what you are used to, and so it feels more comfortable to you. $_ is inscrutable if you haven't studied perl, but the same thing would happen to anyone who sees a python decorator for the first time. what does "else: do after a while loop in python? Only people who know python know what it does (and I suspect most don't). The different quoting operators are also trivial to learn. In comparison, yield from python is also simple syntax but the semantics are much more involved. BEGIN? Take 60 seconds to read what it means. And if you knew awk, you'd not have to do that, as it was directly lifted from awk. | |
| ▲ | EgregiousCube 9 minutes ago | parent | prev | next [-] | | Honestly, $_ and "what does a function do when I don't supply any arguments?" are really nice in Perl, and not that difficult to understand. I think a lot of languages could use a 'default variable'. | |
| ▲ | montroser 22 minutes ago | parent | prev [-] | | Yeah, it's true that Perl did not have as a design goal that a complete newcomer should be able to intuitively understand the code without having any prior exposure to the language. There is a little bit of a learning curve, and that was completely expected by Perl's creators. Yes, you have to learn about the idioms above, but they became second-nature. For many of us, the model clicked in our heads and the terseness was worth it. You could express a lot of functionality in very few characters, and if you had invested in learning, it was very quick to grok because common patterns were reduced to familiar abstractions in the language. And yet, as the industry grew and all sorts of people from all sorts of backgrounds converged in this space, the tolerance and appetite for funky/terse waned in favor of explicit/verbose/accessible. It's probably for the better in the end, but it did feel a little bit like the mom-and-pop store on the corner that had weird pickled things at the register and a meemaw in the back got replaced by a generic Circle K with a lesser soul. | | |
| ▲ | asa400 4 minutes ago | parent [-] | | > And yet, as the industry grew and all sorts of people from all sorts of backgrounds converged in this space, the tolerance and appetite for funky/terse waned in favor of explicit/verbose/accessible. It's probably for the better in the end, but it did feel a little bit like the mom-and-pop store on the corner that had weird pickled things at the register and a meemaw in the back got replaced by a generic Circle K with a lesser soul. This is an amazing point that I haven't seen anyone else make about languages in this way. As someone who got into the industry right after Perl's heyday and never learned or used it but learned programming from some former Perl power users, Perl has a pre-corporate/anarchic/punk feel about it that is completely opposite to something like Golang that feels like it was developed by a corporation, for a corporation. Perl is wacky, but it feels alive (the language itself, if not the community). By contrast, Golang feels dead, soulless. |
|
| |
| ▲ | harpiaharpyja an hour ago | parent | prev [-] | | Seems like the essential criteria is not whether you can write opaque code in it, but rather whether the language enables you to accomplish most tasks using clear, readable code. They aren't mutually exclusive. Hopefully I am paraphrasing you correctly. |
|
|
| ▲ | petre 2 hours ago | parent | prev | next [-] |
| Yup, Perl is something clearly out of Unseen University, err I mean Berkeley linguistics dept. I liked it, thought the sigils were a cute way to singal that something is a variable. When you work with deeply nested data structures, dereferencing arrays and hashes that sort of changes and becomes kind of annoying. Nowadays I like Ruby. Compared to it, Perl does feel like spells mixed with C and Posix stuff. But if I want to feel smart, I'll write some code in Scheme, thank you. |
|
| ▲ | lo_zamoyski an hour ago | parent | prev [-] |
| The term "surrogate activity" comes to mind, specifically, activities of no real value that some people like to waste time on to feel better about themselves. |