The Usability of Ownership

11/12/2020
by   Will Crichton, et al.
0

Ownership is the concept of tracking aliases and mutations to data, useful for both memory safety and system design. The Rust programming language implements ownership via the borrow checker, a static analyzer that extends the core type system. The borrow checker is a notorious learning barrier for new Rust users. In this paper, I focus on the gap between understanding ownership in theory versus its implementation in the borrow checker. As a sound and incomplete analysis, compiler errors may arise from either ownership-unsound behavior or limitations of the analyzer. Understanding this distinction is essential for fixing ownership errors. But how are users actually supposed to make the correct inference? Drawing on my experience with using and teaching Rust, I explore the many challenges in interpreting and responding to ownership errors. I also suggest educational and automated interventions that could improve the usability of ownership.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/12/2023

REVIS: An Error Visualization Tool for Rust

Rust is a programming language that uses a concept of ownership to guara...
research
08/23/2023

Integrating Large Language Models into the Debugging C Compiler for generating contextual error explanations

This paper introduces a method for Large Language Models (LLM) to produc...
research
06/27/2019

Investigating Compilation Errors of Students Learning Haskell

While functional programming is an efficient way to express complex soft...
research
03/17/2023

ChameleonIDE: Untangling Type Errors Through Interactive Visualization and Exploration

Dynamically typed programming languages are popular in education and the...
research
08/19/2022

User Experience of Symptom Checkers: A Systematic Review

This review reports the user experience of symptom checkers, aiming to c...
research
08/09/2023

Fixing Rust Compilation Errors using LLMs

The Rust programming language, with its safety guarantees, has establish...
research
01/05/2023

The Usability of Advanced Type Systems: Rust as a Case Study

Advanced type systems that enforce various correctness and safety guaran...

Please sign up or login with your details

Forgot password? Click here to reset