5 ms·
Some lisps use parenthesis and brackets interchangeably. Some people prefer to strategically alternate them, but you're free to use them exclusively. Guile Sc
by mikegerwitz 9y ago
Some lisps use parenthesis and brackets interchangeably. Some people prefer to strategically alternate them, but you're free to use them exclusively.
Guile Scheme, for example:
scheme@(guile-user)> [list 1 2 3]
$1 = (1 2 3)
scheme@(guile-user)> (list 1 2 3)
$2 = (1 2 3)
scheme@(guile-user)> [car '[1 2 3]]
$3 = 1
- eatonphil 9y agoWhile true, this is not officially supported as part of the RnRS standard I believe. They set these characters aside as reserved for future use.
- mikegerwitz 9y agoYes, you're correct. R7RS at least explicitly reserves brackets and braces, and only acknowledges parenthesis in its syntax.
- lispm 9y agoI think this depends on which RnRS you look at.