Rust is a general-purpose programming language that is both type- and memory-safe. Rust does not use a garbage collector, but rather achieves these properties through a sophisticated, but complex, type system. Doing so makes Rust very efficient, but makes Rust relatively hard to learn and use. We designed Bronze, an optional, library-based garbage collector for Rust. To see whether Bronze could make Rust more usable, we conducted a randomized controlled trial with volunteers from a 633-person class, collecting data from 428 students in total. We found that for a task that required managing complex aliasing, Bronze users were more likely to complete the task in the time available, and those who did so required only about a third as much time (4 hours vs. 12 hours). We found no significant difference in total time, even though Bronze users re-did the task without Bronze afterward. Surveys indicated that ownership, borrowing, and lifetimes were primary causes of the challenges that users faced when using Rust.
翻译:鲁斯特是一种通用的编程语言,既使用类型又使用记忆安全。 鲁斯特不使用垃圾收集器,而是通过复杂而复杂的类型系统实现这些特性。 这样做能让鲁斯特非常高效,但使鲁斯特相对难以学习和使用。 我们设计了一个蓝铜,一个可选的、以图书馆为基础的垃圾收集器。 我们为鲁斯特设计了一个铜,一个可选的、以图书馆为基础的垃圾收集器。 为了看青铜能否使鲁斯特更便于使用,我们与来自633人班的志愿者进行了随机控制试验,共收集了428名学生的数据。 我们发现,对于需要管理复杂化名别名的任务,青铜用户更有可能在现有时间内完成这项任务,而那些这样做的用户只需要大约三分之一的时间( 4小时对12小时 ) 。 我们发现,尽管青铜用户在使用鲁斯特后又重新完成了任务,但总的时间没有显著差别。 调查显示,所有权、 借款和寿命是用户在使用鲁斯特时面临挑战的主要原因。