My Python annoyances
Alex Martelli
aleax at mac.com
Sat Apr 28 17:05:44 EDT 2007
James Stroud <jstroud at mbi.ucla.edu> wrote:
> André wrote:
[snipping total repost of André's post]
> > I'm really annoyed at Python - and not for the reasons already
> > mentioned on this list.
> >
> > Everyone know that programming is supposed to be a dark art, nearly
> > impossible to learn. Computer code is supposed to be something
> > impossible to read to the common person and yet reveal their secrets
> > to the initiated - just remember the code displayed in the Matrix...
> >
> > Python takes all of that away. It is just too readable. Even
> > beginners can quickly learn to read code written by experts.
> >
> > To make it even friendlier to beginners, Python uses ugly double
> > underscores both as prefix and suffix on "magic methods" to be invoked
> > only by more advanced programmers. What's the fun in hiding the
> > complexity so that beginners can stay away from potential problems.
> >
> > And why, oh why, does raw_input() have to go? Here was at least one
> > good example of something that gave a hint (what does "raw" mean?) at
> > the underlying complexity. Combined with the evil of the hidden eval
> > in the more obvious input(), there was at least a chance to trip
> > beginners into doing something "dangerous". Alas, that will no longer
> > be the case...
> >
> > Python does not even make good use of weird symbols like $ and @ and %
> > to define variable types like Perl does. Now, that's a language to
> > learn if you want to be respected. I think that Georg Brandl had it
> > right in his recent proposal:
> > http://mail.python.org/pipermail/python-dev/2007-April/072419.html
> >
> > If not Perl, perhaps Python should be inspired by a language like C++,
> > full of arcane stuff and, thankfully, requiring typing declaration.
> > This dynamic typing thing makes it just too easy to write working
> > programs quickly, especially combined with the ease of use of the
> > interpreter. And this other thing called "duck typing" is just too
> > flexible to use.
> >
> > No, Python should be more difficult. It should take a full two
> > minutes to compile a "Hello World" program on a modern computer.
> >
> > Also, this "docstring" business has to go. Any programmer should, as
> > a rite of passage, have to spend countless hours reading obscure
> > documentation to learn other people's code before finding out what
> > methods can be used and how they should be used. Having to use things
> > like "dir" and "help" just makes it too easy.
> >
> > And don't get me started about the absence of curly braces to define
> > blocks of code. What's the fun in making it so darn visually easy to
> > define such blocks of code, removing the possibility of creating
> > subtle bugs due to the misplacement of a curly bracket. No sir, with
> > Python, the structure has to be obvious at a glance - newbies can see
> > it just as well as experts, thereby decreasing the aura surrounding
> > the latter. This is not fair for people that have spent dozens of
> > hours in learning to program using Python!
> >
> > And don't talk to me about functions, classes and methods, not to
> > mention modules. Python makes it too easy to write code in many
> > different styles, trying to please people who like to write only
> > object-oriented code as well as those that follow the more traditional
> > procedural approach. Even "functional" type people find their way to
> > write code in their preferred method using Python. This is not right.
> >
> > Fortunately, Python has incorporated some newbie-unfriendly features,
> > like metaclasses and, to a lesser extent, decorators which, at last,
> > make use of a special character. There should be more of these, to
> > make Python something more challenging to learn.
> >
> > Programming should be more difficult than this - otherwise, how can
> > programmers be respected by the common folks?
> > ---
> > André
> >
>
> I want to complain about the fact that I wrote 200 lines the other day
> and it worked first time. Problem was, I spent 20 minutes before I
> realized that the lack of errors was a result of the lack of bugs.
More information about the Python-list
mailing list