|
|
|
|
|
by wredue
907 days ago
|
|
I very much doubt that linear types are simpler in a lot of cases. Do they look simpler in cheesy anecdotes? Sure. But again, graphs and linked structures come in the to fray and it’s immediately noticeable that there’s be some problems here. Or maybe I am crazy in thinking that “being forced to update every single link just cause one node updated” is a problem. Even if this is only superficial, I foresee there being not insignificantly annoying issues in how one needs to manage graph and linked structures. |
|
> Is it simple? Yes: the type system rules fit in a napkin. There’s no need to use an SMT solver, or to prove theorems about the code, or do symbolic execution and explore the state space of the program. The linearity checks are simple: we go over the code and count the number of times a variable appears, taking care to handle loops and if statements correctly. And also we ensure that linear values can’t be discarded silently.
https://austral-lang.org/spec/spec.html#rationale-linear-typ...