I wonder if Nim can make use of the concept of mutable value semantics.
In theory it allows safety without using garbage collectors and without using a borrow checker.
Since Nim has so many memory allocation strategies, I wonder if a concept like mutable value semantics might fit in.
More details about it here: https://www.hylo-lang.org/ and here: http://www.jot.fm/issues/issue_2022_02/article2.pdf
Well Hylo's inventor got the whole idea behind it from me as I pointed him to ParaSail for inspiration. Nice that he doesn't mention any of this but not unsurprising.
As for your question. Yes, there is a subset of Nim that supports "mutable value semantics" and this model has good optimizer support in the form or "cursor inference". Could be better, as always.