Python's "only one way to do it" philosophy isn't good?

Douglas Alan doug at alum.mit.edu
Mon Jun 25 02:58:53 EDT 2007


Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:

> Douglas Alan <doug at alum.mit.edu> writes:
>> And likewise, good macro programming can solve some problems that no
>> amount of linting could ever solve.

> I think Lisp is more needful of macros than other languages, because
> its underlying primitives are too, well, primitive.  You have to write
> all the abstractions yourself.

Well, not really beause you typically use Common Lisp with CLOS and a
class library.  If you ask me, the more things that can (elegantly) be
moved out of the core language and into a standard library, the
better.

> Python has built-in abstractions for a few container types like
> lists and dicts, and now a new and more general one (iterators), so
> it's the next level up.

Common Lisp has had all these things for ages.

> And a bunch of stuff that Python could use macros for, are easily
> done in Haskell using delayed evaluation and monads.  And Haskell is
> starting to grow its own macro system (templates) but that's
> probably a sign that an even higher level language (maybe with
> dependent types or something) would make the templates unnecessary.

Alas, I can't comment too much on Haskell, as, although I am familiar
with it to some extent, I am far from proficient in it.  Don't worry
-- it's on my to-do list.

I think that first I'd like to take Gerry Sussman's new graduate
class, first, though, and I'll find out how it can all be done in
Scheme.

|>oug



More information about the Python-list mailing list