Also sprach kj:
^^^^^^^^^^^^^^^^^^^^^^^^^
Tassilo, care to elaborate on what these inconsistencies and flaws
are? (Or could you point me to where I can read about them?)
I've been unable to find this specific article I had in mind. It was a
longish report on various kinds of problems they had with Python in
their company. Some of then seemed to arise from the fact that several
people were working simultaneously on large programs (the common
scenario in the design and implementation of large projects). In
particular, a whole team of programmers was kept busy hunting down a bug
for over a week. The problem eventually turned out to be a trivial typo
of a variable name.
There's an interesting inconsistency in Python with respect to enforcing
certain rules. There are kinds of such enforcements, most notably in the
way source codes needs to be formatted. I am not one of those who thinks
the whitespace-awareness of Python is the real glitch. What I however do
find strange is that no such discipline & bondage measures exist for the
handling of variables. The bug mentioned above would have never been
possible if there had been a way to put Python in a mode that would
disallow using non-declared variables. The Pythoners argue that this is
no problem because their language barfs when accessing an uninitialized
variable. Yet, this is only true for half of the cases: You may still
assign to any variable:
tmpVar = function()
...
tmpvar = another_function()
# too bad, tmpVar still has its old value
print tmpVar
The other common suggestion to catch those cases are external tools such
as pylint etc. These tools become less and less practical when a program
grows. And incidentally, they weren't able to detect the above problem in
this company.
There is more. You may not yet have heard of Python's spiffy meta
classes, taken from the world of aspect-oriented programming. As long as
you write Python, it's ok; you don't have to use that. But surely there
are some people who have used it in their programs in the past and
there's a certain probability that this happened in one of the programs
you have to read. Aspect-oriented programming mixes very badly with the
traditional OO-style of programs. It only makes sense if a program was
designed aspect-orientedly from the ground up. That, of course, is
unprecedented in Python because those meta classes are so wicked that no
brain of the average programmer is capable of grokking them.
In my estimation, Python has tried to become too smart over the past
years. There's just too much stuff that was thrown into the language
in a random fashion because it looked appealing on first sight. Those
things then remained incomplete for a long time (think of the crippled
lambda operator that was only able to handle a single expression quite
unlike real closures known from Perl and Ruby).
Tassilo