On Mar 9, 11:13 am, daly <d...@axiom-developer.org> wrote: > There is a bit of brain-training necessary to read code with > parens but not a lot. In fact, my editor can read paren code.
Hard to see what your point is there. I didn't write let? because I can't read code with parens. I've been writing Lisp since 1983, starting with Lisp Machines, before CL was designed. I have no difficulty reading highly parenthesized, nested code. I wrote let? to scratch a very specific itch. I often found myself writing what amounted to a series of let bindings, where some or all of the bindings had assertions associated with them that would stop further binding if the assertions failed. Conceptually, that pattern really feels like it should be a single let form, but in practice it has to be implemented with a bunch of nested lets, when-lets, if-lets, etc. So let? allowed me to write code for that pattern as the single let that it wanted to be. I wanted a single let form for that pattern for exactly the same reason that we have the convenient form: (let [a foo b bar] ...) instead of the less concise (let [a foo] (let [b bar] ...)) > > The let? syntax breaks code walkers. As does every other macro that the code walkers don't know about. Should that stop us from writing useful macros? If so, why do we have the macro facility? If every useful macro is already part of the language, should we even have defmacro? > The let? syntax breaks pretty printers. In emacs, you can make let? indent as let does by adding the following to your .emacs or .emacs.d/init.el: (define-clojure-indent (let? 1)) > The let? syntax "complexes" read. No idea what you mean by this. > > See the loop package in Common Lisp. > Some people swear by it, others swear at it. I've never liked the loop macro, because it felt like a crutch for people coming from imperative languages. > The idea isn't new. Not sure which idea you're referring to, but in any case I'm quite happy to admit that macros like let? have been written before. > > If you want "readable code" write a literate program. > Literate programs communicate from person to person rather > than having the person "decode" your idea from the code. > If you understand the idea, any syntax is easy to read. Love the preachy attitude. I find let? quite readable, and in fact it makes the specific pattern it's designed for clearer by making a single let form with clauses to handle the assertions and failure code. -- 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