merits of Lisp vs Python

Cliff Wells cliff at develix.com
Mon Dec 11 14:50:45 EST 2006


On Mon, 2006-12-11 at 08:11 -0800, sjdevnull at yahoo.com wrote:

> Bill Atkins wrote:
> > > On the plus side, Python makes less demands on the
> > > capabilities of the editor. All you really need
> > > is block-shifting commands. Bracket matching is
> > > handy for expressions but not vital, and you
> > > certainly don't need bracket-based auto-indenting.
> >
> > Oh, please.  So we should restrict the power of the languages we
> > choose just to make sure that our code can be edited in Notepad?
> 
> In the real world, it's a non-negligible consideration, IMO.  I find
> myself needing to write code on machines that aren't my usual dev
> machine at least a couple of times a year, and not having to install a
> particular editor is nice (especially in terms of keeping the
> modifications to someone else's machine down to a minimum).
> 
> It's hardly a dealbreaker for a particular language, but it's far from
> worthless.


For the most part, editing Python isn't an issue, but I think it's a
fallacy to claim that significant whitespace has no impact on editing
and refactoring.   There's a reason indent-region doesn't work for
Python code in Emacs (and probably never will - I consider the hopefully
uncommon practice of putting "pass" statements at the end of blocks
marginally silly).   There was a time (many years ago) when I used this
feature of Emacs to catch indentation errors in C code.  Just run
indent-region on the entire file and you get a fast visual indication of
where you misplaced a brace.  Trying this on Python code would require
you to restore from a backup file.
Another example is copying and pasting from external sources (web pages
for instance) where the indentation gets totally screwed.  In a language
with block delimiters this is fixed with a couple keystrokes in Emacs.
In Python it requires manually comparing each line with the original (or
typing it in manually to begin with).

I *like* the significant whitespace in Python but let's not pretend
there isn't at least a small penalty.  And I strongly suspect Python's
varied syntactical rules impose far more of a "load" on code editors
than Lisp does (it certainly offers more opportunity for the editor to
do the wrong thing).   

Regards,
Cliff



> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061211/2266cd96/attachment.html>


More information about the Python-list mailing list