Details
-
Type:
Enhancement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code
Description
Depends on extend-instance http://dev.clojure.org/jira/browse/CLJS-398
First patch backs atoms by a protocol IPlace and implements reset! and swap! and compare-and-set! only with protocols
Second patch uses extend-instance to implement global-hierarchy a custom lazy atom
In effect, multimethods and hierarchies can be omitted by gclosure, taking 1K off of hello world
https://groups.google.com/d/topic/clojure/LNfJRw07u8I/discussion
The protocol should probably just be called IAtom. A note, changing atoms to go through protocols has performance implications - generally protocol fns are about twice as slow as regular fns.
I'll take a closer look.