It seems you're refering to CLJS-353 - besides supporting a possible Lua 
backend, it also feels semantically cleaner not to overload array and object 
access - I'd vote for an additional oget/oset or obj-get/set.

Also, the aget and aset interface have this multi-dimensional support thru the 
signature: ([array i & idxs] …), and it's hard to imagine multi-dimensional 
property access on an object…

(btw, unless I'm mistaken, the multi-dimensional array support hasn't been 
implemented yet for make-array and therefor the aget ([array i & idxs] …) 
implementation doesn't work - can't find a JIRA issue for that)

-FrankS.


On Oct 16, 2012, at 9:53 PM, David Nolen <dnolen.li...@gmail.com> wrote:

> It may be worth considering adding an oget to complement aget as was 
> suggesting during ClojureScript/Lua development.
> 
> David
> 
> On Tue, Oct 16, 2012 at 11:30 PM, Evan Mezeske <emeze...@gmail.com> wrote:
> Hmm after reading that docstring, /me hopes he didn't just recommend 
> something for its not-intended purpose....  :)
> 
> 
> On Tuesday, October 16, 2012 8:29:47 PM UTC-7, FrankS wrote:
> Thanks - that works - that was too easy ;-) 
> 
> I looked at the docstring before of aget because I remembered vaguely that 
> that was how it used to work before .- : 
> 
> cljs.core/aget   -   Function 
> 
> ([array i] [array i & idxs]) 
>   Returns the value at the index. 
> 
> Dismissed it for object-access after reading that… guess we can improve on 
> the "clarity" of the docstring a little. 
> 
> -FS. 
> 
> 
> On Oct 16, 2012, at 8:20 PM, Evan Mezeske <emez...@gmail.com> wrote: 
> 
> > I think the easiest solution is to use "aget" and "aset".  There may be a 
> > better way, but if so I'm not aware of it. 
> > 
> > http://stackoverflow.com/questions/9861485/clojurescript-interop 
> > 
> > On Tuesday, October 16, 2012 6:21:45 PM UTC-7, FrankS wrote: 
> > I understand that you can call js-methods and get properties thru: 
> > 
> >     (.a-method some-js-object param) 
> > 
> > and 
> > 
> >     (.-a-prop some-js-object) 
> > 
> > respectively, but how do you invoke either when you have the 
> > method/property as a string? 
> > 
> > The following doesn't seem to work: 
> > 
> >     (let [m "a-method" 
> >           dot-m (symbol (str "." m)] 
> >       (dot-m some-js-object)) 
> > 
> > or 
> > 
> >     (let [m "a-prop" 
> >           dot--m (symbol (str ".-" m)] 
> >       (dot--m some-js-object)) 
> > 
> > And I cannot find any simple function interface for this. 
> > 
> > I must be overlooking something - please… 
> > 
> > Thanks, FrankS. 
> > 
> > 
> 
> 
> -- 
> 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 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 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

Reply via email to