I was sent this and read over the spec recently <https://austral-lang.org/>

It seems to be some attempt to simplify Rust down to something that "a single 
person can understand just by reading this spec."

They basically take the copy and move semantics entry and treat everything as a 
move semantics--which consumes the objects like it does with moves--but then 
they return the object again if you're supposed to continue using it. The 
compiler checks that you used everything exactly once, basically writing the 
entire program and single assignment form. When you're done with the object you 
call something that just doesn't return it so that is destroyed. They gave an 
example of opening a file, writing to that file a couple a times, and then 
closing the file, and the compiler won't allow you to leave that scope without 
closing the file or using some other kind of function that destroys the handle. 
Then there's a very basic version of the borrow checker which allows you to 
prevent that handle from being destroyed, or making the handle immutable so you 
can't write to it, and then you can pass the borrows around, which have some 
kind of basic lifetime tracking as well.

It looked like an interesting kind of system and I'm not sure how much that 
relates to anything Nim programmers would be interested in. I'm also not 
entirely sure how well this would work in practice. Their examples are very 
basic and I'd be curious to see how something simple like an entity component 
system could be written using the linear types they provide. Perhaps something 
that we could macrom or try to expand into Nim if it seemed like it was useful 
enough. 

Reply via email to