Jo what is a good way to have clojure (like) references (atoms) and immutable datastructures in a small dotnet project? I am thinking fsharp or clojure clr? I am thinking about copying the clojiure clr code currently
you could use ClojureCLR as a dependency. You'd need to use either the clojure functions or figure out all the internal interfaces to use the immutable collections. If you know F#, of course, that would be quick. If you are coming from C#, for the immutable collections, there is the System.Collections.Immutable namespace. Do you need something that isn't available there?
I have copied Atom.cs and I am using it with System.Collections.Immutable π
ah F# would be cool, darn it
I was going to suggest that if you needed Atom. Did you exchange the whole IFn interface piece needed for swap and watchers for a simple use of delegates?
I am enjoying F#.
ah yea I changed it to Func<T, T> (also making everything generic instead of object)
(that seemed less surprising for a chsarp code base)
as one should.π
forgot to link the code https://github.com/benjamin-asdf/ClojureAtomRefClr
Nice. You'd have to go the extra mile to get nullable back.