Hacker News new | ask | show | jobs
by Kaizyn 3527 days ago
Have you heard the joke yet about Perl being a write-only language? Have a look at Python, Ruby or Perl6 for your next change of goto language. One of those should still fit your thinking style and should ease some of the pain points of working with Perl.
2 comments

That joke's not true at all, if you write your code well. It comes from many people writing really bad code and sharing it widely through cgi script archives. Lots of stuff on CPAN was bad too. And of course there was a lot of intentionally-bad code too.

These days I'm writing C# web apps, with plenty of client-side javascript. My problems dealing with large complex codebases went away years ago; Perl helped me to discover that I could do this as a career, but it hasn't been a crutch.

>That joke's not true at all, if you write your code well. It comes from many people writing really bad code and sharing it widely through cgi script archives.

Here's the thing. If I read Perl code written by someone new to Perl, it's hard to read.

If I read Python code written by someone new to Python, it's easy to read.

You can write good code in almost any language, so yes, of course you can write readable code in Perl (and I expect experienced Perl programmers write readable code). With Python, everyone writes readable code (albeit some people write more readable than others).

Actually, Python is one of the few languages I've come across where the beginner's code is usually easier to read than an experts (who are more likely to use more obscure features of the language).

Certainly in Python it is easier to read the code, that is find individual lexemes and say what statements do. But thus does not necessarily mean mean it's any easier to reason about the algorithm and to say what a series of statements do. I'd thus rather talk about the readability if individual snippets and not if a language in general. Certainly there are some languages which impede the programmer to interpret the program, but Perl is not one of them.
It is a joke, not to be taken seriously, right?

Do we have these contests in Ruby?

https://en.wikipedia.org/wiki/Obfuscated_Perl_Contest