1

[2011.06171] The Usability of Ownership

 2 years ago
source link: https://arxiv.org/abs/2011.06171
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

[Submitted on 12 Nov 2020 (v1), last revised 22 Sep 2021 (this version, v2)]

The Usability of Ownership

Download PDF

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.

Comments: HATRA @ SPLASH 2020 Subjects: Programming Languages (cs.PL); Human-Computer Interaction (cs.HC) Cite as: arXiv:2011.06171 [cs.PL]   (or arXiv:2011.06171v2 [cs.PL] for this version)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK