Hacker News new | ask | show | jobs
by avian 2519 days ago
Perl more than any other language I know depends on the self-restraint of the programmer to write readable code and not be overly clever with their syntax. I’ve worked on some large Perl codebases in the past that were as readable and maintainable as, say, Python.
2 comments

Yeah, I've seen perl programs so broken down into simple procedural steps that non-coders were able to go in, understand what it was doing and even make some of the changes they needed after a little trial and error, but also other programs so concise and/or confusing that I'd rather rewrite it than try to figure out how it works.
That is not normal.
All the "big" Perl codebases I've worked with were as readable as I'd have expected any "big" codebase to be, if not better. What was your experience like?
25k lines of spaghetti garbage - all in one file.
Sorry you had to deal with that. Do you think it would have been easier to deal with 25k lines of spaghetti garbage in a file named .py?
I think it actually probably would have been - not an ideal way to write code, but Python is certainly easier to read than your average Perl.
I don't find it so. I do both Perl and Python at work: the Perl code is almost always clearer to read IMHO. I know some people find curly brackets and sigils distracting, but to me they make code less ambiguous.