On 17 mei, 08:48, Fabio Kaminski <fabiokamin...@gmail.com> wrote: > first that dinamic languages are better for developers, but you loose some > performance compared to typed languages.. and jvm was created with types in > mind.. so right now clojure data structures are implemented in java and > typed, when you get it in the clojure runtime its boxed already. > > theres some good approaches for dinamic languages like trace-jits(notably > the new mozilla-javascript and luajit) .. but we are not there yet.. (JSR's > was created as lazy sequences .. rsrs) >
This is the typical confusion about "dynamic languages". Actually, Clojure is not a dynamic language, it's a dynamically typed language. Dynamic typing on the JVM generally doesn't suffer from a performance impact, unless you're in the camp of people who believe reflection is "slow". Real dynamic languages like Ruby or Groovy do suffer from a gigantic performance impact due to the feature that distinguish dynamic languages from other languages: the meta protocol. In Ruby and Groovy a method call is never really a method call, it's a message that's sent through the meta protocol. It's this feature that gives you the findByYourGrandMothersBirthDate() "dynamic" methods in Ruby on Rails and Grails. These are not calls to methods at all, they are calls that get parsed and converted into database query statements. Clojure does not have a meta protocol and thus is not a dynamic language, and thus does not have the associated performance impact. You might have heard about Groovy++ which is branded as the new new thing these days. Groovy++ is simply Groovy without the meta protocol, hence fast Groovy. -- 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