On Fri, Oct 25, 2013 at 9:56 AM, David Nolen <dnolen.li...@gmail.com> wrote:

> What I suggested is far, far more conservative than anything else proposed
> on this or on the dev thread.
>

I understand your point that records are a separate "island" unique to
Clojure-land, whereas the other Clojure types need to align with Java, and
therefore, are riskier to mess around with.  But I find it hard to get
excited about a records-only solution, mainly because I hardly ever use
records.  Using straight maps, sets, and vectors to represent data is
perfectly ordinary and idiomatic in Clojure, e.g., Paul's initial code
didn't use records to represent his objects.  So solving the problem just
for records doesn't feel to me like much of a solution.



>  I suspect we can duplicate the approach already taken by Scala for case
> classes.
>
>
>
There are two things that jump out to me as things that might make it hard
to mimic Scala's approach for case classes in Clojure's records:
1. Clojure records function like maps, and you can assoc more things into
them after construction.  Scala is working with a fixed number of fields at
compile time.
2. Scala knows the type of each of the fields at compile time, and so (if I
understand their approach correctly), they can compile a custom hashing
function for the case class that leverages the types of all its components
for maximum speed.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to