Schematology

These are little things I've found out looking at the Scheme implementations we get with Dr. Racket. What we find confusing or surprising varies per person, so I hope some of this may help but no guarantees. Actually I think things are better than in 2008, so there's less to say here.

The Language and Racket

In Racket, your choice of Language should be one of the professional ones, not a student one. As of 2013, the R5RS, pretty big, and swindle options work and I use swindle.

Not all functions (e.g. printf, remv) in Dybvig's index actually exist in Scheme, some are examples. The summary of forms on page 281 is meant to describe what's in the language, but as we know there are additions and subtractions.

I have no idea about how windows implementations relate to linux. Meta hint is that there are different functions in different Schemes.

In Racket To learn about the programming environment, toplevel -> help -> helpdesk-> software ->DrRacket. or something obvious.

Definitely worth learning the Programming interface editor, debugging facilities, etc. I found it fun and very friendly.

I keep windows open to scheme report and other documentation, both available from the help-desk tab on the help button of Racket.

The ``How to Design Programs'' book is cool! should also be a text. (Once again MIT Scheme seems to have more power than scheme report.)

Syntax

The parenthesis structure of cond and let can be confusing-- The only error message you get is "Bad Syntax", so be very careful.

Don't forget to quote! If you want a list, its often '(1 2 3), not (1 2 3).

If scheme sees a comma it thinks 'quasiquote or 'unquote, gets confused. So error messages about those things mean you may have typed a , or ;.

nil is undefined... use null

Semantics

Make sure you know what's true and false: For instance, () is True in conditionals! use null?

(null? #f)  ==> false

(if () (print "True") (print "False")) ==> "True"

(null? '()) ==  (null? ()) ==>  #f

and so on...

Every time I tried to use if I abandoned it for cond . I think the latter is good for structuring a program, the former for simple expressions.

---
This page is maintained by Deer Boy

Last update: 8/1/08