Comment by bmacho
6 months ago
Verdagon has this linear types/higher-RAII article: https://verdagon.dev/blog/higher-raii-7drl
It is about types that can't be copied and can't go out of scope, and the only way to destroy them is to call one of their destructors. This is compile time checkable.
In theory they can solve a lot of problems easily, mainly resource management. Also it generalizes C++'s RAII, and similar to Rust's ownership.
In practice they haven't got support in any mainstream programming language yet.
No comments yet
Contribute on Hacker News ↗