Python syntax in Lisp and Scheme
Doug Tolton
doug at nospam.com
Tue Oct 7 17:21:27 EDT 2003
More information about the Python-list mailing list
Tue Oct 7 17:21:27 EDT 2003
- Previous message (by thread): Python syntax in Lisp and Scheme
- Next message (by thread): Python syntax in Lisp and Scheme
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7 Oct 2003 12:59:07 -0700, hanzspam at yahoo.com.au (Hannu Kankaanp??) wrote: >prunesquallor at comcast.net wrote in message news:<8ynx6tb1.fsf at comcast.net>... >> hanzspam at yahoo.com.au (Hannu Kankaanp??) writes: >> > So getting to the point, doesn't the example show that indentation >> > is in fact a *good* choice for block delimiting? It's an alternative that >> > wouldn't have the subtle bug you introduced here. So how can you >> > claim that this example shows indentation is a poor choice for block >> > delimiting? It doesn't make sense. >> >> The point was that even though I screwed up the indentation, it was >> easily discovered and repaired with Emacs. If the program were >> whitespace-sensitive, then the screwed-up version would be >> mechanically indistinguishable from the intended one. >How do you "screw up indentation"? Actually, being more of a >Python fan, I though you had screwed up parens, since indentation >is absolute for me :). Anyway, do you just go to some line and start >pressing spacebar randomly, and not notice this? Maybe >you do need a safety net, then. > Maybe by coding in an environment with multiple programmers? Alex was saying that Python's syntax and simplicity is so much better for large scale projects with multiple programmers. With just 4 programmers using Python at work we have problems with indentation levels. One guy (me) uses emacs, another uses ultra-edit, another uses Boa and the other uses PythonWin. Indenting can be a major source of compilation bugs. >But the whitespace already has all the structural information needed. >The whitespace doesn't just disappear suddenly, much like parens don't >magically disappear or mutate. > >There can be problems in cutting and pasting code if one mixes tabs >and spaces, like Ingvar said, but generally the rule in Python is to >use 4 spaces for each indentation level. If you break this rule, >you know you had it coming when something fails ;). Just because it's defined that way, doesn't make it less a pain in the ass to fix the problems. of course it's not a big problem if you are the only consumer of your code. Doug Tolton (format t "~a@~a~a.~a" "dtolton" "ya" "hoo" "com")
- Previous message (by thread): Python syntax in Lisp and Scheme
- Next message (by thread): Python syntax in Lisp and Scheme
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list