Hacker News new | ask | show | jobs
by klibertp 2224 days ago
Interesting[1]:

> This library defines disposables, composable first-class producers of values with associated external resources that must be allocated and deallocated such as database connections. Several safe abstractions are provided to consume disposable values while ensuring their associated resources are deallocated after use.

Apparently, disposable supplement custodians to work better for cleaning up externally allocated resources. I found the concept of custodians powerful, but not quite powerful enough, so it's good to see some work done in this area.

[1] https://docs.racket-lang.org/disposable/Basic_Disposable_API...