Hacker News new | ask | show | jobs
by mikegerwitz 3033 days 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
1 comments

While true, this is not officially supported as part of the RnRS standard I believe. They set these characters aside as reserved for future use.
Yes, you're correct. R7RS at least explicitly reserves brackets and braces, and only acknowledges parenthesis in its syntax.
I think this depends on which RnRS you look at.
Do some of the older ones just completely omit reserving them?
R6RS: pairs and lists, enclosed by ( ) or [ ] (see section 4.3.2)
Ah the problem child. :) I've mostly only paid attention to R5RS and R7RS.