On Thu, Mar 8, 2012 at 9:44 AM, Laurent PETIT <laurent.pe...@gmail.com>wrote:

> You should probably both share gists of real code you're talking about,
> shouldn't you ?
>

Most of the stuff I'm working on is closed-source.  Offhand, I'm not sure
what examples I can share, but I'll keep an eye out for that.

In the meantime, just to get a feel for whether this is unique to my code
or universal, I decided that I was going to carefully scrutinize the
nesting level of the next public Clojure code I encountered.  Completely
randomly, the next Clojure code I encountered was this blog post:
http://blog.japila.pl/2012/03/block-scanner-from-let-over-lambda-in-clojure

Take a look at how indented the code is after merely 10 lines of code.  We
start to take this for granted in Clojure, but if you look at it with a
fresh eye, it really is ridiculous.


> Your discussion made me think that editors may help further in this area,
> without having to change the syntax.
> Currently, the editors only try to give some "hints" by playing with
> colors, but there are some other ideas that could be followed:
> - playing with contrast by also using the ability to change the fonts
> - playing with contrast by slowly decreasing the font's opacity as the
> code gets deeper (but where the cursor is, this should probably go away to
> ensure good visibility) => could help see the overall structure without
> seeing to much of the details?
> - playing with "proximity" by adjusting the line sizes. For example, there
> could be extra space around the "true" and "false" clauses of an if, there
> could be extra space around "condition/then" clauses of a cond, etc.
> - playing with the background color of blocks, potentially minimizing (and
> to some extend -in a modal structural editor- almost removing from sight)
> the parens
>
> - since it's not the same thing to "write/edit" and to "read" code, there
> could be the possibility to have a "read" mode where the editor could
> represent totally differently the source code (think it could even present
> it in some sort of prefix-notation :-) )
>
>
I love these ideas.  I think your final comment is especially insightful.
I have no problem writing Clojure code, I just find it unnecessarily taxing
to read it.  The idea of separating the two, and possibly having a
read-mode is an absolutely fascinating idea.  In some sense, Marginalia is
already a good positive step in this direction.  The first time I ran
Marginalia on my code I was astonished at how much more readable it was to
have the comments in a separate column alongside the code, rather than
interrupting the code itself.  It makes me wonder how many other things
could have such a positive, dramatic effect.

-- 
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

Reply via email to