8

I've been learning both Common Lisp and Racket, and one thing that I consistently hear is that Racket is a much "smaller" language than Common Lisp. I was wondering what this really meant. As far as I can tell, the syntax for Common Lisp isn't that much bigger than for Racket.

Basically, I'm wondering what exactly about common lisp is bigger. Does it have more syntax that I just don't know about? Does it have bigger environments? Bigger executables? Bigger libraries? Or some combination thereof?

Please, this is not a "which one is better" thread, I would just like to know exactly what "bigger" means.

4
  • 1
  • 3
    @gnat I looked at that question first... it didn't seem to address this at all, which is why I thought it might merit its own question.
    – jepugs
    Jun 10, 2013 at 22:21
  • Common Lisp being called large is just a historic meme that persists. Once upon a time, it was large. It was certainly large by the standards of what was affordable hardware to the average hacker in the 1980's. Some Lisp hackers hated being required by their institutions to support Common Lisp, compared to something smaller that was hacked down to their hardware. This is exactly the same kind of meme like Emacs being bloated. Remember Eight Megabytes and Constantly Swapping? Now look at the size of your Firefox process today. Or GNU Libc or the kernel.
    – Kaz
    Oct 20, 2016 at 23:29
  • Common Lisp was also called large by the size of the ANSI standard that was ratified in 1994; more than 1000 pages. That's actually not that large. The C language standard is catching up to that now, and I think C++ long surpassed it. I created a small Lisp dialect starting in 2009; the terse reference manual is now 475 pages long when spun into a PDF, with no index or table of contents. Just a one person effort over seven years.
    – Kaz
    Oct 20, 2016 at 23:31

4 Answers 4

5

Common Lisp has a large standard library. Then again, so does Racket.

The main difference is that Racket separates everything out into modules, so that programs that don't use all of the standard library don't have to see it. You just import the bits you want to use, and the rest is neatly hidden away.

4
  • Is that really it? I guess that makes sense.
    – jepugs
    Jun 10, 2013 at 22:42
  • 3
    Common Lisp is a standard, not an implementation. Who desides what lang #racket is?
    – Sylwester
    Jun 10, 2013 at 23:27
  • 1
    Racket is an implementation, Common Lisp is a language. Jun 12, 2013 at 20:21
  • 1
    Most Common Lisp implementations modularize the software with systems, though the base standard is there. Jun 12, 2013 at 20:30
10

Maybe an objective (if indirect) measure would be useful here. Consider the sizes of the specifications for the languages.

Racket is basically an implementation of R6RS Scheme. The R6RS specification is 90 pages long, total. Of that, about 25 pages are devoted to the language proper, and about 30 more are devoted to its standard library. Along with that, you get some introductory material, references, glossary, etc. Depending on viewpoint, you could argue for a range from about 50 to 90 pages as the "real" total of the specification proper.

The Common Lisp specification is approximately 1400 pages total. Again, that includes ancillary material. Still, I think almost anybody would have to admit/agree that the spec itself is at least 800 pages.

In other words, even if we take the smallest estimate we could for the CL spec, and compare it to the largest estimate possible for the size of R6RS, we end up with the CL spec being roughly 10 times the size of the Scheme specification.

3
  • 5
    To be fair, racket has a lot more than vanilla R6RS Jun 11, 2013 at 1:19
  • @jozefg: It does, but most of that is more like API stuff than part of the language -- including quite a bit that has no direct analog in the CL spec, so an implementation that included an analog (which I believe most do) would have still more documentation on that in addition to the CL spec itself. Jun 11, 2013 at 1:23
  • 1
    actually the CL spec describes the constructs in more detail, and the pages of R6RS are very dense. Jun 12, 2013 at 20:21
4

Actually Common Lisp is no longer very big compared to several other languages. If you look at the spec of Common Lisp, then you see that the pages are very long and often about one construct. The Scheme standard for example describes a dozen features on a single page, where Common Lisp uses one page.

Languages like R6RS + Libraries + SRFI, Racket or R7RS big are not really smaller than ANSI Common Lisp.

Where Common Lisp is large: when you factor in some of the semi-standard libraries like the MOP, CLOS-based streams, etc. Manuals for some of the popular Common Lisp implementations tend to be large, because they provide a lot of features in an extensive way.

2

Common Lisp has a very large standard library in the package COMMON-LISP.

Scheme's standard library is much smaller; every implementation comes with its own library (often large enough to rival CL's), usually in many modules.

As for syntax, as far as I know, Scheme's syntax is "fixed" while Common Lisp has very powerful tools which can be used to modify its reader. E.g., CLOCC/CLLIB/xml.lisp parses XML using READ!

Not the answer you're looking for? Browse other questions tagged or ask your own question.