(def tree (function-that-produces-an-enormous-tree 2))

Want do that in Clojurescript, and you'll be treated to tons and tons of
nested tree data printed to the REPL.

Want to time something that's supposed to be lazy, to make sure it's really
lazy, and see how long it takes to produce the eager aspects?  In Clojure,
that's easy:

(time (def result (lazy-function 10)))

In Clojurescript, the REPL will produce the whole lazy sequence.  That's
bad.

So there are a couple examples of things that are harder to do when your
REPL prints the values that are attached to variables.  But again, the real
question here is, why does Clojurescript deviate on this point?  I know
that Clojurescript doesn't exactly match Clojure, but shouldn't all
deviations be done for a reason?

--Mark

On Mon, May 14, 2012 at 5:06 AM, David Nolen <dnolen.li...@gmail.com> wrote:

> Do you have a more specific example of why this is a problem?
>
>
> On Monday, May 14, 2012, Mark Engelberg wrote:
>
>> In Clojure, when you def a variable, the REPL prints the name of the
>> variable rather than the value.
>> In Clojurescript, when you def a variable, the REPL prints the value
>> assigned to the variable.
>>
>> This is problematic when working with lazy values.  Is there any
>> particular reason the Clojurescript REPL is designed to behave in this way?
>>
>> Thanks,
>>
>> Mark
>>
>> --
>> 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
>
>  --
> 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

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