schemedoc / cookbook

New Scheme Cookbook
https://cookbook.scheme.org
29 stars 3 forks source link

Add compatibility chart #52

Open jcubic opened 2 years ago

jcubic commented 2 years ago

It seems that different Scheme implementation works differently in terms of loading R7RS. If we have R7RS code that doesn't work the same out of the box we should list all major implementations and show how to use the code.

An example is bytevector? in Chicken Scheme discussed in #46 also guile use some other code to use R7RS otherwise some of the code may don't work.

I would add a table (markdown support tables, at least on GitHub) with a matrix:

Scheme file REPL
Chiken ... ...
Guile ... ...
Kawa ... ...
lassik commented 2 years ago

https://doc.scheme.org/guide/portable-r7rs/

lassik commented 2 years ago

The core features of Scheme have been the same for decades, and work in R5RS, R6RS, and R7RS as well as most implementations in non-standard mode. Many of the list, vector, and string procedures are like that.

Some code requires R6/R7, or only R6 or R7, or a particular implementation. We could add a note to those. I've been trying to mention on the cookbook page if a code snippet requires SRFIs or non-standard stuff.

jcubic commented 2 years ago

We can link to that page from the cookbook. This is exactly what I have in mind. But I think it should be updated for REPL at least in Guile to load SRFI you use a different code.