We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
All of the following are equivalent, but the first is not documented:
(set! obj -field val)
(set! (. obj -field) val)
(set! (.-field obj) val)
Also, the second one is documented wrong as:
(set! (.- instance-expr instanceFieldName-symbol) expr) ; ^ space should be removed
example using doto:
(def obj (doto (create-obj) (set! -field1 1) (set! -field2 2)))
the arity is only documented here in a parser comment:
(defmethod parse 'set! [_ env [_ target val alt :as form] _ _] (let [[target val] (if (= 4 (count form)) ;; (set! o -prop val) [`(. ~target ~val) alt]
source from slack:
https://clojurians.slack.com/archives/C03S1KBA2/p1704890400974659
The text was updated successfully, but these errors were encountered:
No branches or pull requests
All of the following are equivalent, but the first is not documented:
(set! obj -field val)
(set! (. obj -field) val)
(set! (.-field obj) val)
Also, the second one is documented wrong as:
example using doto:
the arity is only documented here in a parser comment:
source from slack:
https://clojurians.slack.com/archives/C03S1KBA2/p1704890400974659
The text was updated successfully, but these errors were encountered: