On 26 December 2011 18:09, Louis Yu Lu <louisy...@gmail.com> wrote:
> My proposition is enhance Clojure to accept both (f x) and f(x), the
> leading item can appear either after ‘(‘ as usual with classic Lisp
> notion:
> (println "Hello," "world!")
> or with conventional function call notation:
>        println("Hello," "world!")
> The f(x) notation is just a syntax sugar, the only restriction is no
> space between the leading item and '('.  If one or more spaces in
> between, the item will be treated as a separate symbol.

This seems a -really- bad idea. I doubt there's any chance whatsoever
of this being adopted in Clojure.

Here's some reasons why not:

1. Using a single space to differentiate two completely different data
structures seems prone to error. e.g. (f (g x)) != (f(g x)).

2. The syntax is inconsistent with other data structures, unless you
make f[x] = [f x] and f{x} = {f x}

3. It obscures the fact we're dealing with lists. When I see f(x), it
doesn't intuitively look like a list of two elements, whilst (f x)
does.

4. Two syntaxes for defining lists would make maintaining Clojure
programs -really- annoying.

5. It's incompatible with Lisp-aware editors like Emacs/Paredit.

I'm sure there are more reasons, but those should be enough
considering the only advantage is to make Clojure slightly more
approachable. And really, having a different syntax is good, because
it helps enforce the idea that (f x) is a data structure, not just a
function call.

- James

-- 
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

Reply via email to