Also, do you have some documentation about how Ref...
# arrow
h
Also, do you have some documentation about how Ref works?
s
h
I was looking for something a bit more in deep, but I'll take a look at it again to see if I missed something there
s
What were you hoping to find? I’ve written a lot of these docs but I am still wondering what people expect where. For
Ref
a simple example of using
var x: Int
vs
Ref<ForIO, Int>
with a concurrent counter shows what it does but not really how it’s used in for example a back-end but more docs are harder to maintain and not very fun 😛 We are postponing it a bit because we’re going to make our
IO
bifunctor like ZIO, and doing the docs after seemed easier.
h
The first question I think when reading the documentation is: "why I can't directly use an AtomicReference"? Or, "why it is bounded to an F (like IO)"? I think I have the answer, but they are just assumptions right now.
s
Okay, clear thanks 🙂 Extreme short version is that with
Ref
we can take of all the additional boilerplate you’d write to use
AtomicReference
within
F
(
IO
).
👍 1
The concurrency primitives like
Ref
,
Deferred
and
Semaphore
deserve a larger doc section after BIO.
h
Yes, I think they should be well documented as the concurrency problems are the ones that are well-solved with FP and so they should have more evidence