On 6/18/14, Whitfield Diffie <whitfield.diffie@gmail.com> wrote:
... all the counts by me and by Diffie are somewhat flawed due to our laziness about not really counting things "right".
It wasn't laziness on my part (although I have plenty); I didn't know what you wanted. It wouldn't be difficult to produce counts of two sorts of primitives. I could do this study on my code, counting only the lisp commands I did not write myself or I could do it on the system code and count only the ones defined in C. That is easy to get from the documentation system and I believe I can send a list without much trouble.
I believe that Allan Wechsler is right in thinking that lots of the Elisp primitives are about the data structures. Weeding those out would take more judgement.
--that is the benefit of also counting for a quite different big LISP program such as "Macsyma" rather than "Emacs" -- it will not have a lot of stuff about buffers and the cursor, but will focus artificially on other stuff. If we compared the two we could start seeing what is real versus what is an illusion. Best of all is a large corpus of different programs by different authors at different times for different purposes, but that's too much work for me. The serious studies I cited put 400 to 2000 programs in their corpus, but did only 1 language for only 1 year.
Presumably plus and times are about the fact that a language does arithmetic. As I said earlier, I think a count of words in Common Lisp would be rather different.
--would also be of some interest... I don't think it is worth getting too buried in the details of just exactly what is the "right" question since at least for the purposes I care about, fairly low relative-accuracy counts suffice, plus it is not obvious what the "right" question is exactly anyhow. I'd also like to see a quite different language type, such as ML, examined, to see if it changes anything. As far as I can see the LISP counts mostly agree fairly well with what would naively be expected from the counts in C-like languages, if just look at the C-like subset of LISP. The stuff in LISP like car and cdr which has no C counterpart, is another thing entirely.