NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Second order effects of language syntax (Score:2)
After a few months on the project, they had some interesting insights into the different world views of Perl and Python. A moderately experienced Perl programmer can skim over a random piece of Perl code and immediately tell if it's total crap (a la Matt's Script Archive), intentionally obfuscated, unintentionally obfuscated (influenced by misguided style guides), moderately good, well-written and crystal clear, seriously clever for good reasons, or drunken code. I think that pretty much covers the gamut.
On the other hand, Python is intentionally and proudly optimized to be readable by beginners. Therefore, any Python programmer of even the most basic skill level should be able to read any Python program (if not completely understand the underlying algorithm and data structures). The unintentional side effect is that a moderately experienced Python programmer needs to read, rather than skim, each and every Python program he picks up to determine if it's total crap, moderately good, well-written and crystal clear, clever for good reasons, or written while drunk.
Since then, I've heard stories of projects like Chandler, where the Python code is seriously unpythonic, and written in the early days by C++ programmers who coded as if Python were an interpreted dialect of C++. In these cases, it seems that it's even more difficult to discern what a Python program does, since you need to read more deeply into the code to get to the moment when you ask yourself what on Earth were they thinking? before you reach enlightenment, trace through the execution paths before seeing how to rewrite ~1000 lines of C++-in-Python with ~30 lines of more reasonable, idiomatic Python.
There is no 'good' or 'bad' here. There are just choices with desired properties and unintended consequences.
Reply to This
Re: (Score:1)
Great thoughts, as usual Ziggy.
Without being able to understand the program's design in the large or small, is being able to read the program even interesting? I can't think of a case where it is. Am I missing something?
Re: (Score:2)
I think you're approaching the problem from the wrong direction.
Given a new program and no previous understanding of how it works, you could read the program and build an understanding from there. Consider the first time you approached a full set of basic binary tree primitives, or a bubble sort. It may have been the first time you came across these concepts, but if you could r
Re: (Score:1)
That’s how I feel about Java. Regardless of how crappy the code, it always looks reasonable on a microscopic level.