On Sat, Jan 28, 2012 at 12:16 PM, Max Penet <zcams...@gmail.com> wrote:

> Hello David,
> This is interesting!
> The JavaScript behavior is definitively not a good one, that said the
> only thing that I think could do more harm than good is the fact these
> checks are enabled by default. I am not sure the majority of cljs user
> will want to take a performance hit (or have to set a flag to disable
> it) on this given the fields where it will most likely be used (web
> ui, web backends), and it might not be obvious to the newcomer.
> I would rather have it disabled by default and have to (set-checked-
> arithmetic! true) to enable it. But I could be wrong, and in the end
> it is mostly a strategy decision, being convenient vs doing it right
> (fixing JS).
> Max


Clojure favors performance - but correctness comes first. ClojureScript is
already *considerably* slower than hand-written JavaScript - we're using
copy-on-write data structures, sane truth testing, protocol dispatch, etc.
Yet ClojureScript is pragmatic and provides performance escape hatches via
simple access to Object, Array, loop/recur statements that compile down to
equivalent JS iteration constructs, etc.

I think ClojureScript's gamble on client side development is a good one.
Let's write our software right first but make it easy to apply
optimizations later.

In my experience as a client side JS developer, I'd prefer some correctness
over performance for most applications. For performance sensitive code
(like high performance Canvas animation) ClojureScript should most
definitely provide the tools such that we can compete with the equivalent
JavaScript - ideally with less code.

David

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