|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Interesting article here about how to design a popular programming
language.
http://www.paulgraham.com/lib/paulgraham/pop.txt
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, as car and
cdr often are, in successive lines. I've found that it matters
a lot how code lines up on the page. I can barely read Lisp
code when it is set in a variable-width font, and friends say
this is true for other languages too.
This reminded me of how Larry made sure that 'next', 'last', and
'redo' were all the same length, so that people would be able to
remember them as a group.
There's a lot of other good stuff there too, including some that's
specifically about Perl.
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|