Easy-to-use linear types ======================== Allow simple usage of linear types when using only local variables and/or parameters and/or return values. Have a "lock system" with automatic garbage collection (collected no later than when the arena is destroyed) for more complex cases. Assume that `open` create a linear/owned `File` type. Trivial case: func stuff code own File f = open "file.txt" .write write f "hello" # uses `f` but does not take ownership close f # takes ownership of `f` end Nested case: func get_file returns own File f code # Allow simple usage when returning return open "file.txt" .write end Complex case: func maybe_open_file code if use_file # begin_ownership thefile thefile = open "file.txt" .write suspend_ownership thefile # disallow changing the `file` variable when it is # suspended? end end func maybe_write_to_file code if use_file resume_ownership file write thefile "hello" suspend_ownership file end end func maybe_close_file code if use_file resume_ownership thefile close thefile end_ownership thefile end end