> Example 1:
I'm pretty sure one could create a set of rules with penalty scores, like latex
does, for rendering the prettiest, most dense code.
> (-> (some lengthy collection expr here)
> (map f2)
> (reduce f1 #{}))
But I find this to be the most readable.
> [[(dec x) y w h ]
> [x (dec y) w h ]
> [x y (inc w) h ]
> [x y w (inc h)]]
I wonder if this wouldn't be handled better by a matrix tagged literal.
I find manual column alignment to be a ridiculous time waster when refactoring
code.
Few tools help and changing a single symbol messes up the entire function.
> (cond
> (pred1) (consequence1)
> (pred2 x z) (consequence2))
>
> (cond
> (pred1)
> (consequence1)
> (pred2 x z)
> (consequence2))
This looks like it could be formatted with a penalty based rule system as well.
> All of this, of course, is to say nothing of the minor issues of preserving
> comments; preserving comment column alignments where desired; and preserving
> commas where useful in literal data (though I personally tend to eschew them).
In a structural editor you would probably have no comments in the source, see
gorilla-repl or mathematica notebooks.
> Code is data, and sometimes the best way to format that data for human
> readability is sufficiently ad-hoc that no autoindent/pprinter could do a
> fully general good job.
These ad-hoc things might make the code astheatically pleasing, but hard to
read imho.
Cheers Jan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.