Man I grepped our production code base for aget and it's used all over the place, courtesy of the myriad of clojurescript tutorials out there, as well as a few books, that teach this idiom for interop with JS objects. Looks like we got a bit of refactoring in our future :)
On Thursday, August 6, 2015 at 2:11:34 PM UTC+2, David Nolen wrote: > As I said we're never going to add anything for this. Consider this the > official statement about the matter :) > > > David > > > On Thu, Aug 6, 2015 at 8:09 AM, Peter Taoussanis <[email protected]> wrote: > > We are not adding any new functions for dealing with objects. Use > > goog.object. > > > > Judging by the number of people I've seen reach for `aget` out of > convenience, I might suggest that object property access is a common enough > use case to be worth at least considering a sanctioned util for? > > > > Nested reads using `goog.object` is cumbersome and tricky to get right; it > would seem unfortunate to me if folks ended up resorting to writing their own > adhoc wrappers (or just kept on using `aget` which can be error prone in > surprising ways). > > > > I'd encourage you to reconsider a PR to allow the idea to at least sit with > you for a bit? Entirely your call though, of course :-) > > > > Thanks again for all your input & patience on this. Cheers! > > > > Here's `oget` again for anyone else that might find it handy: > https://gist.github.com/ptaoussanis/2556c56d93bde4af0415 > > > > > > -- > > 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.
