Re:State Machines and the Strange Case of Mutating API
by a1369209993 on Tuesday December 25, 2018 @01:45PM
(#18758663)
Er, yes; that's what I said (or rather, hanging various things including but not limited to pointers). C only supported the typechecking part of this because it doesn't have any facilities for compile-time linearity checking.
Linearity[0] and dependency[1] checking is what makes Rust a improvement over C, rather than yet another "let's reinvent C++, but slightly less awful" project.
0: "error: no implementation for copy〈T〉","error: no implementation for drop〈T〉"[2]
1: "error: cannot move/destroy x (of type T); y (of type T&'x) outlives it"
Linearity[0] and dependency[1] checking is what makes Rust a improvement over C, rather than yet another "let's reinvent C++, but slightly less awful" project.
0: "error: no implementation for copy〈T〉","error: no implementation for drop〈T〉"[2]
1: "error: cannot move/destroy x (of type T); y (of type T&'x) outlives it"