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

01/05/2023
by   Kasra Ferdowsi, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/27/2020

An Empirical Study of Ownership, Typestate, and Assets in the Obsidian Smart Contract Language

Some blockchain programs (smart contracts) have included serious securit...
research
03/03/2019

Oxide: The Essence of Rust

Rust is a major advancement in industrial programming languages due in l...
research
12/10/2019

User-Centered Programming Language Design in the Obsidian Smart Contract Language

Programming language designers commonly guess what language designs woul...
research
12/10/2019

Usability Methods for Designing Programming Languages for Software Engineers

Programming language design requires making many usability-related desig...
research
11/15/2020

Coming to Terms with Your Choices: An Existential Take on Dependent Types

Type-level programming is an increasingly popular way to obtain addition...
research
11/27/2018

User Support for the Combinator Logic Synthesizer Framework

Usability is crucial for the adoption of software development technologi...
research
11/12/2020

The Usability of Ownership

Ownership is the concept of tracking aliases and mutations to data, usef...

Please sign up or login with your details

Forgot password? Click here to reset