Python syntax in Lisp and Scheme

Eli Barzilay eli at barzilay.org
Tue Oct 7 19:47:19 EDT 2003


james anderson <james.anderson at setf.de> writes:

> Eli Barzilay wrote:
> > 
> > > > Yes, but I was talking about the difference approaches, for
> > > > example:
> > > >
> > > >   (dolist (x foo)
> > > >     (bar x))
> > > >
> > > > vs:
> > > >
> > > >   (mapc #'bar foo)
> > >
> > > are these not two examples of coding in common-lisp. how do they
> > > demonstrate that "scheme is much more functional"?
> > 
> > The first is very popular, the second is hardly known.
> 
> somehow i wonder if we're discussing the same language.

These are both Lisp examples.  The first is much more popular than the
second.  Scheme has an equivalent for the second, not for the first.

Conclusion: the first one is stylistically preferred in Lisp, the
(equivalent of the) second is stylistically preferred in Scheme.


> > R5RS has `for-each' which is exactly like `mapc', but no `dolist'
> > equivalent.  In Scheme, this is not a problem, in Lisp, the syntax
> > makes me worry for the extra effort in creating a closure.
> 
> what me worry? about syntax?
> [...]

You completely missed my point.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!




More information about the Python-list mailing list