DEV Community

Discussion on: 100 Languages Speedrun: Episode 52: Perl

Collapse
 
bbrtj profile image
bbrtj

You could at least try to hide your bias towards Ruby when talking about a completely different language. It is somewhat blinding you:

  • is ruby "so much more useful overall"? I fail to see how it could be to anyone who isn't already biased towards ruby. Is it more expressive? Does it offer more community libraries? Does it support more architectures or OSes?

  • perl has readability issues while ruby hasn't - highly subjective. The perl I write has close to zero readability issues to me (duh), even after being left on the shelf for a year. I can hardly read ruby. That being said, I can also hardly read Russian, but I'm not saying it has readability issues.

  • perl, when written readable, resembles ruby - may be, but messy perl is a powerful tool for oneliners and one-off scripts. It does not mean perl is inferior, as the sentence suggests.

Your article covers some stuff that are widely avoided or only known by a handful of people:

  • prototypes
  • context (the wantarray part)
  • code golfing
  • flip flop

Instead, it could have hightlighted the more important traits of the language, used all the time:

  • manual references and hash / array auto flattening in list context
  • reference counting and weak references
  • lexical scoping and closures
  • blessed references and community object systems
  • notable community libraries and frameworks
Collapse
 
taw profile image
Tomasz Wegrzanowski

I think you misunderstood the idea of the series. After I do Hello World and FizzBuzz, I'm mainly looking at what's unique and interesting about each language, and Perl has a ton of that, so I picked a few things Perl does which are really unusual. Talking about lexical scoping and closures and reference counting etc. would be completely boring, as so many other languages do that.

Talking about Perl OO system would actually be super interesting, especially its unique features like changing class of an object on the fly (which is absolutely used behind the scenes, for example by URI.pm); however I think that would take a bit too long to explain.

I'm not sure why you list these features are widely avoided, as they're used all over the standard library, and many common Perl libraries; Perl is also a very popular code golfing language. Maybe nontrivial flip flops are rare.

I generally only cover base language, and only go outside standard library if it's missing some core functionality I need (so far most commonly JSON). Covering libraries and frameworks would really not fit the post size I'm going for.

Of all the languages, the only exception to the one post per language rule so far has been Raku which is getting 3; Perl actually would have enough cool stuff to deserve a few more episodes, but most of that cool stuff (like Perl style regular expressions) is already used by a lot of other languages.

Collapse
 
bbrtj profile image
bbrtj

I mostly agree with the point about avoiding the review being boring. However, Perl is a different beast. I think you did a pretty good job reviewing the base language quirks, but with CPAN modules it pretty much becomes "make your own language, as long as it has sigils". I think that's the most interesting aspect of perl, and surely unique as hell.