← Back to context

Comment by dwedge

2 months ago

I also choose Perl most of the time, but I think this is the first time I've ever heard anyone call it super nice to read

I've heard it called a "write-only language"

  • They call it like that, but it depends on the programmer as always. The problem is, that it is really flexible, more so than python or javascript, so it gives you all the tools to shoot yourself in the foot and take away the leg with it.

    An example, you can rewrite the calling program in a module.(https://metacpan.org/pod/Acme::Bleach orhttps://metacpan.org/release/DCONWAY/Lingua-Romana-Perligata...)

    While cool for jokes or serious DSL's, it may lead to difficult to understand code. (Nothing wrong with Damian Conway btw, I just remembered he used source filters in interesting ways).

    • > They call it like that, but it depends on the programmer as always.

      There are different styles, but in general they are concise, and I like them.

      perl use various sigils to remain concise, while other languages take a lot of room on the screen: too many letters in the usual function names, not enough sigils within the language.

      It's like if everything was in binary or hex, instead of using the full range of ASCII: while technically possible, it may be harder to fit into your head

      Python has one sub-style I dislike the most: using tabs for indentation, because how much EXTRA room they use on the screen.

      It must not just be me, as there are solutions for coloring the spaces (I forked https://github.com/csdvrx/indent-rainbow to focus on black-and-white and using spaces instead of tabs)

      I use space to limit the issue, but I can't make python less verbose.

      > it gives you all the tools to shoot yourself in the foot and take away the leg with it.

      python isn't innocent either: I recently traced a issue where exit(0) wasn't working to a threading problem, making a bad use of atexit.

      7 replies →

  • It's more readable than C++, C or Rust though

    • 100% depends on how it’s written. It gives a ton of flexibility regarding incorporating “magic variables” which can lead to incredibly abstruse code. The language motto is “there’s more than one way to do it”, and that’s implemented to a fault.

      5 replies →

    • Depends on who wrote it. My own Perl code, and plenty I've seen, is extremely clean and readable; sadly, a lot isn't. I'm sure clean and readable C++ exists, but the stuff I have to work with - big codebases with tons of history - is not. "Terrifying" would be more apt in most cases.

      1 reply →

  • > I've heard it called a "write-only language"

    A frequent opinion. Easy way to fit in for people who never bothered to learn the language. Which is all the more sad that Perl is super easy to learn (one layer at a time).

  • Also called executable line noise, like Python is called executable pseudocode.

    But I like Perl (and other languages) too.

    Variety is the spice of life.

The joke used to be that Perl code looked like an explosion in an apostrophe factory.