On the Programming Languages Comparison Site (http://
shootout.alioth.debian.org/u64/benchmark.php?
test=all&lang=clojure&lang2=fsharp), if you run the Clojure vs. F#
comparison, Clojure scores about the same in speed as F# (but does use
more memory).

At first this surprised me, since Clojure is dynamically typed, while
F# is statically typed. After some thought, however, it occurred to me
that Clojure can generate code very similar to statically typed
languages using type hints. Of course, as soon as you add type hints,
the code is no longer dynamically typed, but rather statically type.
You lose the ability to do duck-typing on the arguments to a function.

For those cases where performance is more important than flexibility,
Clojure offers an advantage over "traditional" dynamic languages
(Ruby, Python, etc.) in that the programmer can choose.

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