On Thu, Oct 18, 2012 at 1:45 PM, Grant Rettke <gret...@acm.org> wrote:

>
> Anyone voted for internal define lately?
>

On the one hand, internal define would be nice because it would help
alleviate the nested let problem and possibly be more intuitive for
newcomers.

On the other hand, sometimes (rarely) you actually want to have a function
create global variables.  If def didn't work the way it did, it would be
extremely difficult to achieve that effect.

Since there are other ways to create local variables (albeit with the
unfortunate consequence of increasing the indenting level) but no other
convenient way to create global variables, the decision to have def always
affect the top-level environment seems to me like it creates the most
semantically expressive power.  So overall, I like it the way it is.

That said, in my own code I find it essential to work with one of the
macros that provide a way to intermingle locals and conditionals without
indenting the code halfway across the screen.  I'd like to see some
standard way to do this eventually work its way into Clojure core.

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