Cormorant icon indicating copy to clipboard operation
Cormorant copied to clipboard

Add support for atoms

Open austinzheng opened this issue 9 years ago • 3 comments

Add support for atoms. To quote the ClojureScript documentation: "Clojure's model of values, state, identity, and time is valuable even in single-threaded environments." However, atoms should be built in a way that proper concurrency support can easily be added if it ever comes to this project.

austinzheng avatar Mar 27 '15 22:03 austinzheng

I've experimented with implementing Clojure's Agents in pure Swift. It sorta works, but due to the differences between Value Types and Reference Types, using them is not as smooth as using them in Clojure. However, the gist of my work might be useful within Lambatron to implement Atoms and Agents (i.e. the GCD stuff). I thought I'd share this here. https://github.com/terhechte/Cederic

Btw. awesome project.

terhechte avatar Aug 20 '15 18:08 terhechte

Nice! I'll check it out. Thanks.

Unfortunately the project is broken with Swift 1.2, and my computer is in the shop so I haven't been able to debug it. The project hasn't died; I'll be porting it to Swift 2 as soon as my machine returns.

austinzheng avatar Aug 20 '15 18:08 austinzheng

I'm not even sure how well the cederic code fits, I just thought I'd share it. I've also seen implementations of Clojure's Persistent Data Structures in Swift somewhere, which would probably help, too. Cheers!

terhechte avatar Aug 20 '15 18:08 terhechte