

Clojure Datatypes (coming 1.2 feature) - swannodette
http://clojure.org/datatypes

======
swannodette
With datatypes and protocols it's now possible to get pretty much on par with
the speed of Java classes while staying idiomatic.

For an example of how idiomatic this can look in action, check out
[http://github.com/ztellman/penumbra/blob/master/src/penumbra...](http://github.com/ztellman/penumbra/blob/master/src/penumbra/geometry.clj#L90)

This vector math datatype will be as fast a Java class + the cost of an object
clone. The upside is that you have a value entity that has the exact same
concurrency safe semantics as Clojure's built in datatypes.

This coupled with Rich Hickey's plans for 1.3 (support for returning
primitives from fns) means you'll truly be able to write highly idiomatic
Clojure code with host performance without jumping through hoops (much less or
no type-hinting, no macro inlining, etc).

~~~
runevault
Jeeze I'm out of the loop, had no idea there was talk of allowing functions to
return unboxed primitives. Apparently I need to hang out in #clojure again or
the like.

