Python syntax in Lisp and Scheme
Pascal Bourguignon
spam at thalassa.informatimago.com
Thu Oct 9 18:00:24 EDT 2003
Edi Weitz <edi at agharta.de> writes:
> [Followup-To ignored because I don't read comp.lang.python]
>
> On Thu, 09 Oct 2003 16:13:54 GMT, Alex Martelli <aleax at aleax.it> wrote:
>
> > I think it's about a single namespace (Scheme, Python, Haskell, ...)
> > vs CLisp's dual namespaces. People get used pretty fast to having
> > every object (whether callable or not) "first-class" --
> > e.g. sendable as an argument without any need for stropping or the
> > like. To you, HOFs may feel like special cases needing special
> > syntax that toots horns and rings bells; to people used to passing
> > functions as arguments as a way of living, that's as syntactically
> > obtrusive as, say, O'CAML's mandate that you use +. and not plain +
> > when summing floats rather than ints
>
> In Common Lisp (not "CLisp", that's an implementation) functions /are/
> first-class and sendable as an argument "without any need for
> stropping or the like." What exactly are you talking about?
Read him.
He's talking about NAMESPACES. "namespace" occurs twice in his
paragraph, while "function" occurs only once, that should have given
you a hint.
Namely, he's saying that people used to write: (mapcar cadr '((a 1) (b 2)))
don't like having to write: (mapcar #'cadr '((a 1) (b 2))) in Common-Lisp.
[ Personnaly, I rather write it as: (mapcar (function cadr) '((a 1) (b 2)))
The less read macro the better I feel.]
--
__Pascal_Bourguignon__
http://www.informatimago.com/
Do not adjust your mind, there is a fault in reality.
More information about the Python-list
mailing list