Python syntax in Lisp and Scheme

Jacek Generowicz jacek.generowicz at cern.ch
Thu Oct 16 04:22:26 EDT 2003


mertz at gnosis.cx (David Mertz) writes:

> But the underlying issue was the spurious claim that lambda forms
> were somehow required for HOFs, which is totally bogus.  Python
> could get by with only 'def', Lisp with only 'defun', and Haskell
> only '=' and 'where'... and all of them would be just as capable at
> using combinatorial and other HOFs.

Yes, but arguments such as these are the first step down the slippery
slope to Turing Equivalence. For just about any feature in just about
any language, you could argue that the langugage could get by without
it ... and taking this to its logical conclusion, you end up with
assembler.

I love Python, but the fact that its support for anonymous, inline
defined, literal (however you wish to call them) functions is severely
limited annoys me on a frequent basis. It makes programming in Python
more difficult or painful for me than it would otherwise be.

Ultimately, all these Python v Lisp arguments boil down to the
differing philosophies:

Python:

- Keep it simple

- Guido knows what's best for me


Lisp:

- Provide as much power to the programmer as possible, out of the box

- I know what's best for me, and I want a language that allows me to
  invest effort in making difficult things easy for me


All these isolated arguments over what each one of us finds better
about some feature of one language or the other, are completely
pointless. (And they are downright vandalistic, when half of the
criticisms of the "other" language are baseless, as they so often seem
to be.)

If you buy into the Python philosophy, use Python. If you buy into the
Lisp philosophy, use Lisp. I happen to buy into both; each has its
appeal in certain environments.

So, yes, Python could do without lambda altogether, and I would still
program in it. It would be less pleasant than it is now, but still
orders of magnitude more pleasant than C++ or Java. On the other hand,
Python could provide fully-fledged anonymous functions, and then it
would be even more pleasant to use. That is one of the (many) things I
love about Common Lisp; it tries so damn hard to make my life easy for
me. It is devoid of arbitrary restrictions.

Arguing that your favourite language is better than all others,
because the crappier ones provide you with a more restricted toolset,
while the better ones provide you with too good a toolset, is,
frankly, naive and childish.

Google for: paul graham blub




More information about the Python-list mailing list