> Will identical? correctly handle keywords under advanced compilation, with keywords constants emited?
The missing part of your question is: "What about dynamically constructed keywords?" When the constant table provided by this patch is enabled, all keywords statically present in source code will test identical? to other keywords that come from elsewhere in the source. At compile time, all keywords will be replaced with namespace.dotted.field.lookups. The real question is what happens when you construct keywords using the cljs.core/keyword function? Well there are two subcategories: 1) Keywords that already exist in the constant table 2) Never before seen keywords For #1, we *can* look them up in the constant table and return those instances, which will produce keywords that test identical? against source-level or other dynamically-created, but elsewhere-in-source keywords. I'm not sure if this branch does that (or if it should). For #2, we can't intern the keywords like Clojure does on the JVM because JavaScript does not provide weak references. If we interned dynamically created keywords, then we'd have an exploitable memory leak. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
