> Whoa! Cool example. This is rather an important point, I think. I > mean it's not important, when your "only" programming with Clojure, > which will usally work, and you always have the REPL... But it > becomes more important for those, trying to understand. It's about > grokking a language's design vs. experimenting with the code long > enough so that it seems to work.
Yeah, pretty awesome :) I love how almost any technical question on this list can be answered by a three-line REPL interaction! >> (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. It's not really a happy accident, it's as specified. ' quotes the next read form. #^ applies metadata to the next read form. Granted, I have some experience with reader macros from CL, but I feel this should be an area that a moderately well-educated programmer should encounter, perhaps trip up, say "oh yes, I see why that happens", and move on, rather than viewing it as some kind of fault to be corrected. When you realize that reader macros and quotation marks are a way of communicating with the reader that's parsing the text of your code, things become a little simpler. > 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. Coming from CL myself, I have two inputs to this debate. Firstly, CL has more syntax than one at first thinks (for a Lisp, at least) — particularly the raft of reader macros (including configurable ones), but also things like format string keywords. It simply doesn't have a plurality of *delimiters*: just double-quote, block comment, and parens, really. Secondly, I view most of Clojure's syntax — mainly delimiters for literal maps, sets, and vectors — to be completely worth the sacrifice of simplicity. The delimiter characters are there, and it would be foolish to waste them. The things that makes Perl "Perlish" to me are the special variable line-noise ($/, $_, $&, etc.), contexts (scalar etc.), and extreme parse-time lexical manipulation, all of which conspire to make the meaning of a piece of code enormously context- and runtime-dependent. (For example, you can't parse Perl without executing it.) I don't think Clojure's additional delimiters compared to Common Lisp moves it towards Perl in this way. I hate Perl, and I don't have that reaction to Clojure! :) > 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. As I'm sure you know, this is an unfortunate consequence of Clojure's youth. Clojure only turned 2 last month, so I think its vibrant library collection and community are actually surprisingly large and vigorous. Docs take time to accrete, and Rich is devoted more to development than to filling in perceived gaps; a lot of knowledge is tied up in mailing list posts, videos, and presentations. I know Tom and others have been working to improve the doc situation. > Alex, John, Meikel, Richard, > thanks for taking your time. My pleasure. I love this community! -- 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