I care a lot more about being able to understand the problem domain and maintain the code than merely being able to read it by way of familiarity with an Algol-derived language with class-based OO support and dynamic typing.
Surely being able to read the code makes it easy to maintain: the reason you might use perl is for existing libraries/support and the level of abstraction available.
Language design has a direct impact in maintainability.
> Surely being able to read the code makes it easy to maintain....
I've never written code intended for complete novices to maintain. I don't care if people who have never programmed in the language before can maintain code written in the language without learning the language. I think that's an effective way to ruin your code and your project and any long-term plans you have around the project.
I care deeply about maintainability and learnability, but I care not one whit if someone who's never programmed in Perl can look at real-world Perl code and suss out exactly what it does and why based on... guesswork? Intuition? Experience with languages that are not Perl?
In design there is a trade-off of complexity vs. usability. Perl does a good job at giving programmers access to a lot of complex features by using clever/borrowed metaphors and idioms. The complexity still remains. This means when writing systems above a certain size perl is not a good choice precisely because it takes time to parse.
I like perl, but maintainability has more aspects than just following community conventions.
I don't know where you got the dislike of Algol: I cannot see the resemblance of algol and lua. Algol is in perl's ancestry (via the bourne shell) though.
> This means when writing systems above a certain size perl is not a good choice precisely because it takes time to parse.
> I like perl, but maintainability has more aspects than just following community conventions.
I think you contradict yourself.
In my experience, maintainability has a lot more to do with naming conventions, the use of abstractions, the use of metaphor to understand and express concepts of the problem domain, testability and coverage, repetition, the use of language and library idioms, consistency of expression, unit boundaries, and encapsulation of code and concept than language syntax.
> I don't know where you got the dislike of Algol....
I don't dislike Algol, but I believe that there's a strong tendency in certain circles to believe that Algol-family syntax is so obviously right (or pervasive) that jumping between languages in that family is simple.
Let me summarize as I'm beginning to think that Perl is a member of your family:
- You don't write code for novices
- You don't think language design has an impact on overall maintainability of the code, maintainability is all about the abstractions and naming conversions of the programmer.
- You would insist that any code you wrote should be maintained by a professional programmer.
- Readability of an algorithm has nothing to do with maintainability, if you name everything right the reader is a fool if he doesn't get it.
> You don't think language design has an impact on overall maintainability of the code....
Also not what I wrote.
> maintainability is all about....
Still not what I wrote.
> You would insist that any code you wrote should be maintained by a professional programmer.
That's a lot closer to what I wrote, but it's subtly wrong.
> Readability of an algorithm has nothing to do with maintainability....
That's nowhere near what I wrote.
> if you name everything right the reader is a fool if he doesn't get it.
I've never written anything, anywhere, suggesting that idea.
Please do give me some credit for having coherent thoughts based on practical experience writing widely used programs. The nuance in my parent posts wasn't particularly subtle.
Half a dozen comments here (and lots in every other discussion on the subject) notes that you better learn the language before you talk about readability. (Perl has more syntax to learn -- the extra work is dwarfed by the libraries in every modern language. But you better follow the "Best Practices", for Perl.)
Goladus might not be a troll, but according to his own statements he doesn't write enough Perl to really know it. He just sprouts lots of opinions on things he don't know.
Edit: A few words for clarity.
Edit I might also note that Goladus' second code example did a complex algorithm without comments in a way that could be classed obfuscated.
Trolls don't normally make good points. In a way you illustrate the point being made:
but according to his own statements he doesn't write enough Perl to really know it. He just sprouts lots of opinions on things he don't know
From the point of view of a professional programmer as simpler language like Lua takes hours to learn. What you loose is the power of expression, however for a novice one doesn't perhaps want this power. For example if I were writing a platform for photographers, I wouldn't choose a perl as an extension language: it depends on the audience.
Don't get me wrong I've written perl in commercial environments since 1994, and privately before that. Goladus makes a good point.
First, Godalus implied that he knew what he was talking about regarding Perl, until it was pointed out that he didn't. Then he changed story.
Edit: I might also add that Godalus' second code example modified an array inside an append to the array -- inside two tight loops... I've only seen things like that in obfuscations. (It could be extreme optimization -- but with a few earlier versions in comments or cvs/subversion/git/etc.) Tell me THAT code choice is not trolling...?
Edit: Removed the rest, which has been written by multiple people in this thread.
Surely being able to read the code makes it easy to maintain: the reason you might use perl is for existing libraries/support and the level of abstraction available. Language design has a direct impact in maintainability.