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?
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.
> 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.
- 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.
All I can do is wish you luck.
That's not what I wrote.
> 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.
If your software works so well and is so well documented that end-users never have to look at the code then there is no problem.
I wouldn't recommend writing code to be readable by complete novices, but code that requires less obscure knowledge to read is more valuable.
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.
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.
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.