HackerPapers

arXiv:2301.02308cs.PL

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

Kasra Ferdowsi

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Advanced type systems that enforce various correctness and safety guarantees--such as linear and ownership types--have a long history in the Programming Languages research community. Despite this history, a human-centered evaluation of these type systems and their usability was all but absent, with empirical evaluations limited to testing their expressiveness in programs written by experts, i.e. the creators of the type system. In the past few years, this has begun to change with the adoption of a version of affine types and ownership in the popular Rust programming language. With the increase in Rust's popularity, various studies have begun empirically evaluating the usability of Rust's Ownership and Lifetime rules, providing a breadth of qualitative and quantitative information on the usability of such type systems. They found that despite Rust's general success in achieving its promise of safety and performance, these rules come with a steep learning curve and have been repeatedly cited as a barrier to adopting Rust. In this report, I provide a brief history of linear types and region-based memory management, which directly inspired Rust's type system. I then introduce Rust's Ownership and Lifetime rules, and present the state-of-the-art in academic research into their usability. I discuss both theoretical arguments and empirical evidence for why these rules are difficult to learn and apply, and survey existing work on addressing some of these difficulties. I also draw from broader works in the HCI and CS Education communities to recommend future work in this area.

arXiv comments
Written Report for PhD Research Exam
Journal reference
DOI
Subjects
cs.PLProgramming Languages cs.HCHuman-Computer Interaction

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Mar 2023 to Mar 2023. Found in 3 HN submissions from Jan 2023 to Feb 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Interesting that this came up; I was reading https://arxiv.org/abs/2301.02308, on Rust's usability, earlier today. One of the interesting conclusions from that paper was that while Rust's error messages are generally high-quality, they can sometimes be too local, especially for…

      DylanSpView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.