`aget` in Clojure is only for arrays. Nothing changes just because you are using ClojureScript.
Using `aget` on objects is as appropriate as adding two strings together with `+`. Use the right function for the right type. Many people have abused this "feature" (including myself). But it's time people familiarized themselves with the functionality of the `goog.object` namespace for operations on objects. David On Wed, Aug 5, 2015 at 10:00 AM, Peter Taoussanis <[email protected]> wrote: > @Shaun: would be easy enough to get `nil` safety via `aget` though?: > > (defn aget > ([array i] (when-let [a array] (cljs.core/aget a i))) > ([array i & idxs] (apply aget (aget array i) idxs))) > > Just wondering what the rationale is for discouraging this since it seems > (?) to work in practice far as I can tell. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
