Comment

Comment by DanWaterworth

> The thing is that, in Haskell, even when you attach a function to run during destruction, the runtime doesn't guarantee that the function will be called promptly, or even at all.

However, this is different than the bracket pattern that the article is taking about. No one in the Haskell community advocates cleaning up resources (like file descriptors, etc) using only destructors.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton