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

Chris Mellon arkanes at gmail.com
Wed Jun 27 17:09:57 CEST 2007


On 6/27/07, Andy Freeman <anamax at earthlink.net> wrote:
> On Jun 26, 10:03 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> > > Map doesn't work on generators or iterators because they're not part
> > > of the common lisp spec, but if someone implemented them as a library,
> > > said library could easily include a map that handled them as well.
> >
> > Right, more scattered special purpose kludges instead of a powerful
> > uniform interface.
>
> Huh?  The interface could continue to be (map ...).
>
> Python's for statement relies on the fact that python is mostly object
> oriented and many of the predefined types have an iterator interface.
> Lisp lists and vectors currently aren't objects and very few of the
> predefined types have an iterator interface.
>
> It's easy enough to get around the lack of objectness and add the
> equivalent of an iterator iterface, in either language.  The fact that
> lisp folks haven't bothered suggests that this isn't a big enough
> issue.
>

Is this where I get to call Lispers Blub programmers, because they
can't see the clear benefit to a generic iteration interface?

> The difference is that lisp users can easily define python-like for
> while python folks have to wait for the implementation.
>

Yes, but Python already has it (so the wait time is 0), and the Lisp
user doesn't.



More information about the Python-list mailing list