ClojureScript

Doc for DOT has example showing incorrect/discouraged use of aget

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.10.238
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

I just finished reading the doc on misuse of aget/aset for js objects and then stumbled on an example showing the wrong use of aget:
http://cljs.github.io/api/cljs.core/DOT


You can get the value at property "foo" with any of the following:

(. o -foo)
;;=> "bar"

(.-foo o)
;;=> "bar"

(aget o "foo")
;;=> "bar"


I assume that last example is a doc bug from the past. I marked the priority as Major because it seems there is a big problem with misuse of aget and this doc error isn't helping.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: