It's intentional and how the reader is implemented. The set of parseable tokens is intentionally decidable without more than 1 character of lookahead in the majority of cases. There are some corner cases but generally you're not going to run into them.
On Friday, June 22, 2018 at 6:34:03 PM UTC-5, Didier wrote: > > Hi, > > I've noticed that it seems you can omit the space between brackets, and > everything still parses as normal. I tend to prefer doing that in some > instances, for example: > > (fn[a b] (+ a b)) > > It seems to hold in all scenarios, for example: > > [1 '...[2 3]] > > Yields [1 '... [2 3]] > > And > > [1[2[3]]] > > > Yields [1 [2 [3]]] > > Or > > (defn add[a b] (+ a b)) > > Etc. > > So my question is: *Is this an official parse rule for Clojure and its > dialects like ClojureScript, ClojureCRL and EDN, or the fact this works is > accidental, and shouldn't be relied on?* > -- 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.