News for hackers. Stuff that matters.
Re:What Made Lisp Different (2002) by skybrian on Sunday February 18, 2018 @07:03PM (#16409725)
- Phrases (space separated lists): a b (c d) e

- Comma-separated lists: a, b, (c, d), e

- Square-bracket lists: [a, b, c]

- Blocks (curly brackets and separated by newlines or semicolons): { a b; c d }

- Dotted lists, where sometimes the dots can be omitted: foo.bar.baz

In combination, you can write something like:

  for x in [1, 2, 3] {
    foo.bar(x + 1, x * 2)
  }
Which can be interpreted as 7 lists. The top-level list has five items, the last two of which are lists. The last list is a block containing one item, which is a three-item dotted list. The argument list after "bar" is a two-item comma list containing two phrases.

I've implemented this, but I'm not satisfied with it; the corner cases are tricky to understand.

There are no comments on this comment yet.