Open ocharles opened 9 years ago
:+1:
Is master
usable atm? I'm mostly looking to see if regions
is a good fit for some work I'm doing.
Yes master
should be usable.
However, I haven't updated all its reverse dependencies yet.
What are you thinking to use regions
for, if I may ask?
Ah, gotcha.
Over at @haskell-game we're trying to get a decent mid/high-level API written for the SDL2 graphics library. We're a good way there, but we need a good story around handling of scarce resources. Finalizers don't cut it, because even though something is no longer lexically in scope, it's still operationally in scope via OpenGL's massive state machine (or various other state machines). It seems that if we want automatic memory management, regions are going to be the way to go.
I prefer regions
over resourcet
, because there's considerably less scope to shoot yourself in the foot :)
Another more restrictive but simpler library might be Gabriel Gonzalez's managed library.
I'll try to make a release of regions
sometime this week so you can more easily work with it.
managed
is nice, but it has the same problem most other naive regions-like libraries have - you can't interleave operations. The key benefit of lightweight monadic regions is the ability to duplicate something into another scope. But then, you already know this as you wrote the library :)
I try to make a new release when I have some time.