This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Reader option to permit brackets as parentheses



Chez Scheme was the first Scheme system I ever used; it's developed by
Kent Dybvig, who is a professor at IU.  Chez Scheme allows square
brackets, and they were part of the coding style we used at Oberlin.

We used square brackets for let bindings:

(let ([a 4]
      [b 10])
  (+ a b))

and for cond clauses:

(cond
  [(pair? x) (op (car x) (recur (cdr x)))]
  [else tail])

We had a version of Gosmacs hacked so that typing ")" to match a "["
would actually insert a "[".  When we ditched the VAX 750 for Sun 3's,
and GNU Emacs became useable, I rehacked it to do the same, but I
think I lost the code.

When I switched to another Scheme system, I was annoyed that I
couldn't use square brackets.

So:
1) brackets are supported by a top-notch Scheme system, written by
   a highly respected researcher, one of the RnRS authors.
2) brackets can be used in a way which provides additional visual cues
   about code structure.

So please don't bomb Lynn.  I don't think brackets are entirely evil.
And besides, I only live about eight blocks away from the IU CS dept.


In the big plan:

- We want to scope microsyntax the same way we scope bindings --- you
should be able to import hash readers the way you import
gethostbyname.  Same for brackets.

- We want to have modules providing pure R4RS and pure R5RS, but we
also want to provide a default "Guile Scheme" mode, which is RnRS plus
whatever extensions we think are really handy.  This is just like what
every other Scheme system does.  In that, perhaps we should support
brackets.  Of course, we'll need to pitch in diffs for the Emacs
Scheme modes so that they understand brackets correctly, match them
automatically, etc.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]