Stefan Kamphausen <ska2...@googlemail.com> writes:

>>   (meta '#^{a 1} greet)
>
> To be honest, I think it looks even worse.  There is some reader macro
> which by happy accident works in a certain way together with the other
> read syntax.  No, I don't think it should work.

I agree this is ugly and unintuitive and I wouldn't use it in a real
program, I'd use with-meta instead.  I included it as an illustration
that some reader macros like ~, ' and @ are just shorthand for regular
macros: unquote, quote and deref respectively, while others change the
behaviour of the reader, like #^, ; and #_.

Unfortunately syntax-quote (`) currently falls into the latter camp, but
I hope that will change in Clojure-in-Clojure.  Try this to see
something scary:

'`(foo)
=> (clojure.core/seq
    (clojure.core/concat
     (clojure.core/list 
      (quote user/foo))))

The reason it needs to break the list down like that is so that it can
implement splicing-unquote.

> Hm, is it possible you're coming from Java here?  For me, coming more
> from CL than Java, some things in Clojure feel very --let's say--
> Perlish: there is so much syntax there.  Don't get me wrong, I think
> Clojure delivers what arc promised, it does a hell of a job
> revolutionizing Lisp.

Yes, I have a mainly non-lisp background, much C, Python, Ruby and
some Java and Haskell and various other languages.  I had dabbled in
Common Lisp and Scheme a bit before discovering Clojure but found Common
Lisp very complex and Scheme very verbose and the lack of syntax for
common data structures like hash tables frustrating.  So perhaps I fall
towards the slightly more sugary side of the spectrum compared to
Scheme, especially when it comes to data structures but I do agree that
things might be clearer without the ^ and #' reader macros and
restricting #^ just to type hints.

> I hardly can disagree with many of the design
> principles, I just like the documentation to tell the whole story so
> not everyone new to Clojure will have to figure it out for him/
> herself.

Yes.  Stuart's book "Programming Clojure" is a much better introduction
to the language.  The website is mostly okay as a reference but it is
incomplete and usually out of date.

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