This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-23
Channels
- # announcements (7)
- # babashka (11)
- # babashka-sci-dev (1)
- # beginners (8)
- # biff (1)
- # calva (8)
- # chlorine-clover (3)
- # cider (9)
- # clj-kondo (16)
- # cljdoc (9)
- # clojure (79)
- # clojure-australia (1)
- # clojure-dev (5)
- # clojurescript (24)
- # data-science (3)
- # datomic (2)
- # emacs (54)
- # fulcro (1)
- # graalvm (1)
- # jobs (5)
- # lsp (25)
- # malli (7)
- # meander (10)
- # off-topic (44)
- # other-languages (8)
- # portal (10)
- # remote-jobs (1)
- # sci (1)
- # shadow-cljs (6)
- # vim (4)
what is the meaning of immutability
in defrecord
? i am running below code and I can see that the value is changing in defrecord
,
(def p (atom 0))
(defprotocol protocol-1
(service [this a b] ))
(defprotocol protocol-2
(plugin [this]))
(defrecord record [desc id name version]
protocol-1
(service [this a b]
(println id " "name " "a " " (reset! version 1)))
protocol-2
(plugin [this]
(println desc)))
(println (. (->record"a" "b" "c" p) service "k" "j"))
The record has an immutable reference to an atom, which is mutable
For what purpose?
defrecords store fields in Java class final fields, which by definition can't be modified once set in the constructor
is there a channel for machine learning and/or neural nets?