I have been writing a lot of code in Nim , for multi-threaded code in bigger codebases, it was becoming difficult to work with Raw pointers. But since memory allocation is genesis, so it evolves from allocator into a modular framework, that expose APIS to build data-structures.
With this post, my intention is to better discuss and understand various approaches for building such memory safety and thread-safety frameworks, not essentially pointing out default Nim issues with concurrency ! , as i still lack in experience and knowledge.
A better detailed blogpost is at : https://eagledot.xyz/millets.md.html
Code is at: https://codeberg.org/eagledot/millets
I wasn't aware of this exact proposal, but had an idea that Nimony would resolve some of the (incomplete) primitives like lent/borrow. From what i could understand , i agree that Simple path-based rules could be better approach than complex lifetime tracking, which results in redundant refactoring most of time (just to please compiler). With statement to temporarily move the data is also the way i have been thinking about, rigid moving of a data-structure is sometimes not required.
About acyclic collections, if some user code leads to cyclic references , is it bad to indicate this through an allocator, which will complaint about unreleased memory at runtime , i also never understood why default allocator never tracked each allocation to indicate memory leakages, (is it due to requirement of of locks/atomicCounters to do so ?)
I don't have enough knowledge about Nim compiler internals, so went through the route of a runtime framework, which seems to work really well.