Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
    
2  
@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 '13 at 22:21

4 Answers 4

up vote 4 down vote accepted

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.

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

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.

share|improve this answer
3  
To be fair, racket has a lot more than vanilla R6RS –  jozefg Jun 11 '13 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. –  Jerry Coffin Jun 11 '13 at 1:23
    
actually the CL spec describes the constructs in more detail, and the pages of R6RS are very dense. –  Rainer Joswig Jun 12 '13 at 20:21

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!

share|improve this answer

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 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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