Python users are dumb (or not) (47)

3 Name: dmpk2k!hinhT6kz2E : 2007-12-12 20:30 ID:Heaven

I think code aesthetic is arguably a good thing since we read code more often than we write it.

I can guess some of GvR's reasons for meaningful whitespace, and some have little to do with appearance. One problem I've been contemplating with '}' or 'end' is that it gives no indication which block it's a part of. If you do your indentation wrong you could well end up confusing the compiler, and you end up trying to find the mismatched delimiters. Bourne shell has one solution (if..fi, case..esac), but it's hard to read and adds clutter. Another solution I've seen in Ada (if..end if, case..end case), which is easier to read, but still adds clutter. If you make whitespace significant, you can remove end delimiters and both of these problems go away.

Of course, it's not without problems. I don't like Python's appearance; it has a similar "falling off the cliff" phenomenon that Lisp has, since Python has no end delimiters. PEP8 and the lack of end delimiters results in Python programs being densely written without much vertical whitespace, which hinders readability. Exacerbating the problem is that a lot of Python programmers appear to like using a lot of horizontal space as well, partly due to list comprehensions.

Python is also fairly noisy with symbols, __ and """ being pet peeves of mine. I was looking at the web.py homepage today, and the example on the front page is really bad, both in appearance and the way it was written.

That said, syntax is one of the lesser Python problems. It's a decent language (high praise coming from me), but it has its share of dubious semantics; I tend to think of Python as the Java of the dynamically-typed world.

This thread has been closed. You cannot post in this thread any longer.