nex3/arc — comment on commit 957501d81bafecab070268418a953adb26c9a87c
File:  line 0
By rocketnia:

I actually prefer the idea of using just one kind of brackets all the time. Who needs square brackets? If we have...

```
(mac thunk body `(fn () ,@body))
(mac itfn body `(fn (it) ,@body))
(mac abfn body `(fn (a b) ,@body))
(mac themfn body `(fn them ,@body))
```

...then `(fn () (thunk-body))` can become `(thunk:thunk-body)`--with just one pair of brackets--thanks to `a:b` ssyntax. In certain cases like `(ccc:thunk:thunk-body)`, it can cost _less than one_ pair of brackets, since it reuses the surrounding ones. Similarly, `a.b` ssyntax would let my `[do t]` become `itfn.t`.

I'd also prefer to remove all need for dotted lists, using something else for rest arg destructuring--perhaps `&`. This complicates destructuring, so it's probably not a net benefit for everyone.

Also, I strongly prefer not to settle for "most of the time" when it comes to semantics. The `-mbf-argsyms` check for `quote` is a hack. It doesn't account for macro uses like `[obj _ t]` that expand into `quote`, not to mention uses of `_` that are confined to inner functions (as in `[do [_] t]`). If 'make-br-fn needs to determine its argument list by inspecting the free variables of its body, what I think it should do is compile its body into an AST, then _explicitly_ get the AST's free variables using the same tool the compiler uses.

However, refactoring the compiler to work like I've just implied would be a drastic departure from Arc, so I don't seriously recommend it for Anarki. As a second option, Anarki's square brackets could settle on a policy of "we WILL crawl over all the code looking for symbols for the argument list, regardless of whether they're quoted." Since the semantic madness lives inside a clear lexical boundary (the function body), the programmer can be aware of the meta-influence of the symbols they use in their code.

These are the kinds of things I'd contribute to Anarki myself, if only I didn't expect to get carried away and turn the whole language into Penknife. ^_^