Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That forces you to deallocate resources in the inverse order of allocation, which may or may not be what you want. For example, the lock acquisition and release pattern used in the implementation of Lehman-Yao trees (and variants thereof) is inexpressible using monadic regions.


Hmm, well I've never implemented this myself so I'm not going to contradict you, but I'd be really surprised if you can't hoist into the monad transformer stack and close off a lower region earlier than the top-level region.


Would this be safe if the destructor of an inner region requires objects from outer regions to still exist?


I don't see how there could be any such requirements, if we're talking about file handles.


I'm pretty sure DBMS implementors have to work with data structures whose nodes are spread across several files, and which have to be locked and unlocked in very precise ways to preserve the integrity of the data they contain. I'd like to be able these locking and unlocking patterns with types.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: