> This scheme won't play nicely with forms with variable numbers of special
> arguments.

True, but I've never seen anyone indent specially these optional
arguments. For instance, every defn I see (including clojure.core), is
indented like this:

(defn foo
  [x]
  (+ x 3))

(defn bar
  "Adds four to x."
  [x]
  (+ x 4))

In addition, actually supporting this in a general way will make the
indent spec more complicated (you would have to specify predicates or
something to determine whether an optional argument is presen or not).
This would make it harder for people to write an indent spec and
harder for the editors/tools to support it.

However, there's another option. Instead of supporting optional
arguments in a general way, we can say something like this:

An indent spec can also be the keyword :defn, which means this form
should be structured like a defn.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to