4 ms·
I have to really write careful in Perl to make it readable by non-Perl heads. This is an honest question: why would you care about that? What does it matter if
by chromatic 14y ago
I have to really write careful in Perl to make it readable by non-Perl heads.
This is an honest question: why would you care about that? What does it matter if someone who doesn't know a language (or isn't bothering to learn it) can read code written in that language?
Python sort of forces that on you up-front.
How? Indentation doesn't really matter and, for example, list comprehensions aren't all that obvious to someone who's never seen them before. I can understand "I think sigils might be confusing", but that's such a superficial aspect of programming I'm inclined to dismiss it as such.
- kator 14y ago> This is an honest question: why would you care about that? My goal is to write stuff so I can DIE. In 30 years can you imagine how much I've written. I don't want all that code following me around the planet. I want to move forward and leave for others something they can maintain and understand and use. > Python sort of forces that on you up-front. Again I'm not done with my processing on this but I am a bit unimpressed with using spaces to identify code blocks. Ask me again in a year it might grow on me.. :)
- chromatic 14y agoI want to move forward and leave for others something they can maintain and understand and use. Yes, but why do you care if people who don't understand a language can or cannot read code written in that language?
- kator 14y agoyes because I can write Perl that will make your eyes burn. So can Larry Wall.. So What.. How does that work towards the longer term goal of writing code that I can DIE and it still lives on? If nobody understands it then it will die... If they understand it they can maintain it, give it loving care and feeding and it will live for a long time. No kidding, I have code that has been in production for 27 years.. still.. think about that.. Chances are I will leave this planet and my code will still be running somewhere... Can you say that? And if not, why isn't that your goal? We write code to solve problems for people, not to prove how smart we are. I would argue code that lasts decades is much smarter then 10 lines of something nobody understands and gets whacked on the next refactor.. But then again that's just my style.. :)
- chromatic 14y agoWe write code to solve problems for people, not to prove how smart we are. That reads like a false dilemma to me. Surely there's some wonderful excluded middle between "I write code that someone who doesn't know the language can read it" and "I write code so opaque that you need a language specification, a flashlight, and both hands to begin to comprehend it." I, for example, try to write code, tests, and documentation that a decent developer with a working knowledge of the language and an understanding of the problem domain can figure out what's going on and why. I don't care if someone's nephew or niece who's never programmed before can make heads or tails of the code because I think that's a tremendously silly goal counterproductive to any good business sense. (Also I've never seen a language which can enforce things like effective factoring, intelligible naming, coherent coupling and decoupling, intelligent encapsulation, and the like. Certainly Python doesn't enforce those.)