Re: Parens again

2010-02-03 Thread Timothy Pratley
On 4 February 2010 03:56, CuppoJava wrote: >  1. That indentation is *extremely* important. >  2. That it's not straightforward ( relative to C-languages ). >  3. You're not expected to easily indent code manually. This is insightful and succinct advise which would be a great FAQ or pre-amble to

Re: Parens again

2010-02-03 Thread Dan
I found some thoughts about a clojure lint: http://stackoverflow.com/questions/1938242/how-would-one-create-a-clojure-lint -- 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 f

Re: Parens again

2010-02-03 Thread Dan
> > > The algorithm used is identical, but the structure of the code is > quite different, perhaps being more or less readable. It may be worth > including such details in addition to where one sticks whitespace. > > I think it should be in a different tool but a Clojure lint is an awesome idea.

Re: Parens again

2010-02-03 Thread ataggart
We should note that formatting the code means more than just indentation. E.g.: (map vec (partition 2 (map foo (filter bar? baz vs. (->> baz (filter bar?) (map foo) (partition 2) (map vec)) The algorithm used is identical, but the structure of the code is quite different

Re: Parens again

2010-02-03 Thread Dan
On Wed, Feb 3, 2010 at 12:11 PM, Laurent PETIT wrote: > I think there are also several ways of identing clojure code, depending on > what the tools provide out-of-the-box, and of devs personal preferences: > > * do you see a reindenter like something that will just correctly change > the number o

Re: Parens again

2010-02-03 Thread Laurent PETIT
I think there are also several ways of identing clojure code, depending on what the tools provide out-of-the-box, and of devs personal preferences: * do you see a reindenter like something that will just correctly change the number of beginning spaces of each line, or also something that could re

Re: Parens again

2010-02-03 Thread CuppoJava
As trivial as it seems, proper indentation was also my most significant hurdle when learning Clojure. I finally was only able to "get" s-exps after realizing: 1. That indentation is *extremely* important. 2. That it's not straightforward ( relative to C-languages ). 3. You're not expected to

Re: Parens again

2010-02-03 Thread Christopher Petrilli
On Wed, Feb 3, 2010 at 8:08 AM, Dan wrote: > Once a month, we get a proposal about how to remove the parens so that the > language would be more usable for newbies who are afraid of them. Invariably > this turns out into experienced clojure users telling that the parens aren't > a problem and that

Re: Parens again

2010-02-03 Thread Dan
On Wed, Feb 3, 2010 at 9:09 AM, .Bill Smith wrote: > I won't tell you what editor you ought to use, but Emacs in clojure- > mode takes care of the indentation for you. I suspect editors/IDEs > that "support" clojure do as well. > > Another data point: the Clojure source code (the part that's actu

Re: Parens again

2010-02-03 Thread .Bill Smith
I won't tell you what editor you ought to use, but Emacs in clojure- mode takes care of the indentation for you. I suspect editors/IDEs that "support" clojure do as well. Another data point: the Clojure source code (the part that's actually written in Clojure) is indented, and it's open source.