4 ms·
Aside: what stops chumps from making 3000 line Python "run" functions? (as far as I know, Python doesn't give you an error message when your function gets up
by Roboprog 10y ago
Aside: what stops chumps from making 3000 line Python "run" functions?
(as far as I know, Python doesn't give you an error message when your function gets up to 66 lines, or whatever, long)
- noufalibrahim 10y agoNothing at all. But, in my experience, because of the limitations on how flexible the language is, a 3000 line python function which is edited by multiple people is usually more readable than a 3000 line perl one.
- pjc50 10y agoSemantic whitespace makes it increasingly unwieldy to write huge python functions - you need to see where you're unindenting to, you can't just match parent.
- guitarbill 10y agoCode review or linters. There's a few linters out there, and they're widely known in the community with loads of documentation/examples. I believe there's Perl::Critic, but I've never seen it used on the few Perl projects I've worked on. (As an aside, you can make it more horrible because you don't even need a "run" function - just stuff it into the *.py file and it'll get executed :) )
- marcosdumay 10y agoWhatever reason it is, people don't do that often. They also don't write those often in Ruby, Java, C, and many other languages. Maybe a better question is: what makes 3000 lines single-function code so prevalent in Perl? There's something to say about Perl 5 making function arguments difficult. But I don't think it ends there, because other languages attract the same kind of code.