25

I'm guessing that #lang racket is a dialect of scheme with much more out of the box structures and common functions and perhaps would be more pedagogic. What are the perks a #lang racket against #lang scheme?

Is it best (or even possible) to use #lang scheme in racket to follow all the content of 'Structure and Interpretation of Computer Programs' or even 'How to Design Programs'. HtDP is #lang racket specific?

Whatever code written in #lang scheme, as long as libraries are not being included, can be used in chicken scheme or any main interpreter?

Thanks in advance.

1

1 Answer 1

36
  1. Yes, #lang racket is the racket default dialect, with lots of extensions.

  2. Two places where it is not an extension: if must have an else branch, and pairs are immutable (no set-car! and set-cdr!).

  3. #lang scheme was used for a while before the name change, and now #lang racket is used consistently. But we kept #lang scheme around for compatibility (as well as various scheme/--- libraries that are kept and can sometime be different than racket/--- counterparts). There's no reason to use #lang scheme in new code.

  4. To follow SICP, don't use any of these -- there's a SICP language available (usable with #lang sicp), originally written by Neil Van Dyke, but now maintained within the Racket community.

  5. To follow HtDP, don't use any of these, use the student languages. There are also new #lang-based variants like #lang htdp/bsl but they're not in a complete shape, yet. (And HtDP is not #lang racket specific.)

  6. No, Racket is very different from Chicken Scheme. You might be able to run some code in both, but those would probably be only tiny toy examples.

3
  • Thank you very much for the info Eli, being for the pedagogic purpose I'll go totally with racket, what was very cool of chicken scheme is the compile to C part.
    – orlybg
    Aug 22, 2011 at 19:46
  • With Racket there's not much need to compile to C -- it uses a just-in-time compiler that performs pretty well. If you're concerned about creating standalone executables rather than speed, then there are ways to do that too -- see raco exe and raco distribute. Aug 22, 2011 at 19:53
  • 5
    Just to emphasize one thing here: #lang scheme is almost exactly the same as #lang racket -- it is not any more similar to Chicken Scheme, or to SICP or HtDP than #lang racket is. Aug 23, 2011 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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