At least in edn they're not necessary:
The delimiters { } ( ) [ ] need not be separated from adjacent elements by
> whitespace.
>
I'd argue that it's more consistent to treat all elements the same,
however, be they collection, keyword, symbol or whatever else.
On Sat, 23 Jun 2018 at 00:34, Didier <[email protected]> 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 [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
James Reeves
booleanknot.com
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.