Hi Tim,

On 11/18/2016 2:20 PM, Tim Johnson wrote:
Hello racketeers :

I retired as a coder. Now I can write in whatever programming
language I wish to.

I'd like to learn racket. I intend to start by working off of the
Schemer books. I have the first three.

Is racket fully compatible to the code in the schemer books?
If not, is there a site that would detail any incompatibilities?

Thanks

I don't think there is any definitive list of incompatibilities.

The biggest is that Racket has immutable list pairs (cons cells). In the module language (#lang racket), set-car! and set-cdr! are not defined. There is a separate mutable pair type, mcons, that can be used instead.

The R_RS languages (e.g., #lang r5rs, #lang r6rs) alias cons, set-car! and set-cdr! to the mutable mcons type. You can use lists/pairs normally in R_RS code, but if you try to examine a list in the REPL you will see the difference: e.g.

#lang r5rs
(define p (list 'a 'b))

=> p
(mcons 'a (mcons 'b '()))
=>


If you're working from a Scheme book, you probably should start with R5RS (#lang r5rs).

But see:
https://docs.racket-lang.org/r5rs/index.html?q=r5rs
https://docs.racket-lang.org/reference/pairs.html?q=pairs
https://docs.racket-lang.org/reference/mpairs.html?q=pairs

George

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to