March 08, 2002
Ideas for Arc

Paul Graham has posted the list of features people are requesting for Arc, the lisp variant he is designing.

Whatever your feelings on Arc, you should read through the comments to see what some of the smartest people in computer science think are important, practical features, and where they think Lisp has gone wrong.

Here are a few excerpts that struck me for whatever reason, either because I strongly agree, I find them particularly intriguing, or they instantly evoke visions of comp.lang.lisp erupting into hellish flamewars:

David Moon: "S-expressions are a bad idea."

Peter Norvig: "car and cdr are warts; why not hd and tl?"

Olin Shivers: "If you provide regexps, then you should feel a moral obligation to also provide context-free grammars, i.e., a parser tool, as well."

Pinku Surana (an ex-Neodesicer, like me!): "Check out Todd Proebsting's TR on 'Programming Shorthands'. It's about 'pronouns' in PL syntax. http://www.research.microsoft.com/~toddpro/"

Jim Bullard (another ex-Neodesicer, if you can believe it): "One thing I especially like about Python are the primitives used to specifiy range."
[Added 4:55 pm, March 12]

Ken Anderson has some interesting statistics:

I put together these statistics from a common lisp application

27,935 Function and macros
6,328 Function or macros with keyword arguments

Distribution of number of arguments (no keyword case):

0=1254
1=12961
2=4063
3=1885
4=628
5=302
6=173
7=95
8=69
9=69
10=34
11=18
12=27
13>= 29

Distribution of keyword usage:

(&KEY)=2048
(&OPTIONAL)=1663
(&REST)=1176
(&BODY)=988
(&KEY &REST)=217
(&ALLOW-OTHER-KEYS &KEY)=60
(&REST &OPTIONAL)=51
(&KEY &OPTIONAL)=48
(&ALLOW-OTHER-KEYS &KEY &REST)=43
(&KEY &REST &OPTIONAL)=9
(&BODY &OPTIONAL)=6
(&REST &WHOLE)=6
(&BODY &WHOLE)=4
(&AUX)=4
(&ALLOW-OTHER-KEYS &REST &OPTIONAL)=2
(&OPTIONAL &WHOLE)=1
(&AUX &KEY)=1
(&WHOLE)=1

From this i'd conclude that most functions have 3 or less arguments and that keywords are used less than about 1/3 of the time.

&key seems to be used as much as &optional and &rest combined.

Statistics don't lie: &aux is evil.

Posted by jjwiseman at March 08, 2002 11:57 PM
Comments

What every happen to Dr. James Firby is he still working at INET??

Posted by: Richard on May 2, 2004 07:55 AM
Post a comment
Name:


Email Address:


URL:




Unless you answer this question, your comment will be classified as spam and will not be posted.
(I'll give you a hint: the answer is “lisp”.)

Comments:


Remember info?