You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While (. instance field) returns the value of the field, instead of using (set! ...) to change it (as that's not yet supported), use (var ...) to return a GoVar for the field (the field's value itself is not retrieved). Then use (deref ...) on the resulting GoVar to obtain the value, or (var-set ...) to set it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
While
(. instance field)
returns the value of the field, instead of using(set! ...)
to change it (as that's not yet supported), use(var ...)
to return aGoVar
for the field (the field's value itself is not retrieved). Then use(deref ...)
on the resultingGoVar
to obtain the value, or(var-set ...)
to set it.This discussion was created from the release Support Clojure's "dot" (., .member, type., ..) special forms/macros.
Beta Was this translation helpful? Give feedback.
All reactions