Re: A drawback of the less-parentheses approach

2014-06-10 Thread Karsten Schmidt
Also, if you write your let bindings (according to common convention) so that you have one binding per line, you can use ;; to create a line comment, like: (let [x 1 ;;y 2 ] x) (Ps. A single semicolon would suffice, but the double version keeps indentation when formatting the buffer i

Re: A drawback of the less-parentheses approach

2014-06-09 Thread Alex Miller
The only place I've found the comment macro to be useful is at the top-level of a ns to hold a bunch of test/temp code. On Monday, June 9, 2014 11:22:10 PM UTC-5, Taegyoon Kim wrote: > > Ah, reader macro! Thanks! > > Ignore next form (#_) > The form following #_ is completely skipped by the rea

Re: A drawback of the less-parentheses approach

2014-06-09 Thread Taegyoon Kim
Ah, reader macro! Thanks! Ignore next form (#_) The form following #_ is completely skipped by the reader. (This is a more complete removal than the *comment* macro which yields nil). (from *http://clojure.org/read

Re: A drawback of the less-parentheses approach

2014-06-09 Thread Sean Corfield
On Jun 9, 2014, at 7:07 PM, Taegyoon Kim wrote: > And you can't do this: > user=> (let [x 1 (comment y 2)] x) You can, however, do this: user=> (let [x 1 #_(y 2)] x) and this: user=> (let [x 1 #_y #_2] x) Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection

Re: A drawback of the less-parentheses approach

2014-06-09 Thread guns
On Mon 9 Jun 2014 at 07:07:42PM -0700, Taegyoon Kim wrote: > And you can't do this: > user=> (let [x 1 (comment y 2)] x) Alex Miller (?) once pointed out that the #_ reader macro can be chained like this: (let [x 1 #_#_y 2] x) Pretty nifty. guns pgpn7C26ipuE0.pgp Description: PGP signatu

A drawback of the less-parentheses approach

2014-06-09 Thread Taegyoon Kim
I once liked the Clojure's less-parentheses approach. Today I found that you can't utilize s-expression comments easily in Clojure. e.g. In (let [x 1 y 2] x) When you are about to comment out the "y 2" part, you have to move the cursor back and forth to insert new parentheses. And you can't