Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Overview of Gauche Scheme (practical-scheme.net)
20 points by brudgers on March 2, 2015 | hide | past | favorite | 4 comments


One potentially cool tradeoff in Gauche Scheme is giving up full R7RS [1] compliance inexchange Clojure style keywords that resolve to themselves [2].

[1]: http://practical-scheme.net/gauche/man/gauche-refe_5.html#St...

[2]: http://practical-scheme.net/gauche/man/gauche-refe_48.html#K...

For example:

  gosh> :key
  :key
  gosh> (define :key 5)
  *** ERROR: Compile Error: syntax-error: (define :key 5)
  "(stdin)":2:(define :key 5)

  Stack Trace:
  _______________________________________


We'll address this issue in a couple of releases. It'll be compliant to R7RS and mostly backward-compatible to existing code. The features is already in the dev HEAD.

The trick is:

- There'll be a "keyword" module that conceptually binds and exports all possible names beginning with ':'. Each name is bound to itself.

- The keyword module is implicitly visible to Gauche native programs (inheriting "gauche" module). So, the identifiers beginning with ':' behaves as if they're keywords, unless you rebinds them explicitly.

- From vanilla R7RS, nothing is special with identifier beginning with ':'. You can import the keyword module to make it behave like keywords.


Note that they're working on that incompatibility, and hope to resolve it. It's not really a tradeoff, but simply a relic of predating R7RS.


I've been writing a ton of stuff in Gauche lately and I've found the experience to be great. The standard library is well thought out and the documentation is solid (aside from the ffi / c generator but that side of things seems to be still evolving).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: