Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

racket/base namespace

Anyone know what is included in the racket/base language. I am looking to compare the racket/base namespace definitions with the R7RS draft to get a first hand idea of how divergent Racket is from Scheme.

like image 519
cobie Avatar asked Jul 12 '12 18:07

cobie


2 Answers

The difference is going to be huge, just like any other practical Scheme implementation. To give you a rough idea, I see more than 1300 identifiers from racket/base, and racket goes up to over 2000. Also, note that comparing the names is not going to be the whole story -- there are additional differences, like the fact that Racket uses immutable pairs by default, and like the fact that you get guaranteed left-to-right evaluation order.

A quick way to get the lists yourself for the former would be to make sure that XREPL is installed (have your ~/.racketrc file contain (require xrepl)), then start Racket with racket/base as the REPL language, and use the ,ap (apropos) command with no arguments so it shows you all of the bound names:

$ racket -I racket/base
Welcome to Racket v5.2.1.
-> ,ap

To read about the names, you can use the ,doc command, or just use the search box in the docs.

like image 57
Eli Barzilay Avatar answered Sep 19 '22 19:09

Eli Barzilay


According to The Racket Reference:

Unless otherwise noted, the bindings defined in this manual are exported by the racket/base and racket languages.

Unfortunately that is not terribly helpful since it is a large reference manual. But, since you are comparing R7RS to Racket, it may be useful to just browse through the whole reference to get an idea of what is available.

like image 29
Justin Ethier Avatar answered Sep 20 '22 19:09

Justin Ethier