Python syntax in Lisp and Scheme
Daniel Silva
dsilva at ccs.neu.edu
Wed Oct 8 22:55:47 EDT 2003
On Thu, 9 Oct 2003, Andrew Dalke wrote:
> Consider one of those "hard-headed engineering reasons", at
> http://www.paulgraham.com/popular.html
>
> It has sometimes been said that Lisp should use first and
> rest instead of car and cdr, because it would make programs
> easier to read. Maybe for the first couple hours. But a hacker
> can learn quickly enough that car means the first element
> of a list and cdr means the rest. Using first and rest means
> 50% more typing. And they are also different lengths, meaning
> that the arguments won't line up when they're called,
>
> That to me is a solid case of post hoc ergo proper. The
> words "1st" and "rst" are equally as short and easier to
> memorize. And if terseness were very important, then
> what about using "." for car and ">" for cdr? No, the reason
> is that that's the way it started and it will stay that way
> because of network effects -- is that a solid engineering
> reason? Well, it depends, but my guess is that he wouldn't
> weight strongly the impact of social behaviours as part of
> good engineering. I do.
It hasn't stayed that way for me:
(define first car)
(define rest cdr)
:)
- Daniel
More information about the Python-list
mailing list