[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Scheme: Using brackets in addition to parentheses
From: |
Werner LEMBERG |
Subject: |
Scheme: Using brackets in addition to parentheses |
Date: |
Fri, 20 Oct 2023 12:14:51 +0000 (UTC) |
As I've just discovered, brackets work the same as parentheses in
Scheme expressions:
```
#[set-global-staff-size 26]
{ c' }
```
Guile allows this by default; the read option `square-brackets` is
active for compatibility with R6RS.
Shall we use and advertise this? Some user Scheme code could probably
be made more readable:
```
(let [(foo ...)
(bar ...)]
...)
(cond
[question1 expression1]
[question2 expression2]
[question3 expression3]
[else expression4])
```
Werner
- Scheme: Using brackets in addition to parentheses,
Werner LEMBERG <=