Re:Introduction to Functional Programming in OCaml
by tome on Sunday September 04, 2016 @06:08PM
(#12426957)
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.
[ Parent
| on HN ]
Re:Introduction to Functional Programming in OCaml
by catnaroek on Sunday September 04, 2016 @06:22PM
(#12427003)
Would this be safe if the destructor of an inner region requires objects from outer regions to still exist?
Re:Introduction to Functional Programming in OCaml
by tome on Sunday September 04, 2016 @06:43PM
(#12427075)
I don't see how there could be any such requirements, if we're talking about file handles.
Re:Introduction to Functional Programming in OCaml
by catnaroek on Sunday September 04, 2016 @07:00PM
(#12427144)
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.