arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.12699cs.PLcs.HC
收藏

GeckoGraph:一种用于多态类型的可视化语言

GeckoGraph: A Visual Language for Polymorphic Types

Shuai Fu, Tim Dwyer, Peter J. Stuckey

AI总结:

针对程序员难以理解和使用多态类型的问题,提出图形化类型表示法GeckoGraph以辅助文本类型表示,大规模受控用户研究表明其能提升编程任务完成能力,尤其利好新手。

摘要:

多态类型是大多数强类型编程语言中的重要特性。它们允许函数以可适配不同数据类型的方式编写,同时仍能强制约束值之间的关系与限制。然而,程序员通常觉得多态类型难以使用和理解,更倾向于用具体类型进行推理。我们提出了GeckoGraph,一种类型的图形表示法。GeckoGraph旨在辅助传统的基于文本的类型表示法,让类型的阅读、理解和对比变得更简单。我们开展了一项大规模人类研究,将GeckoGraph与基于文本的类型表示法进行对比。据我们所知,这是迄今为止规模最大的函数式编程受控用户研究。研究结果表明,GeckoGraph有助于提升程序员完成我们设计的编程任务的能力,对新手程序员的帮助尤为显著。

英文摘要:

Polymorphic types are an important feature in most strongly typed programming languages. They allow functions to be written in a way that can be used with different data types, while still enforcing the relationship and constraints between the values. However, programmers often find polymorphic types difficult to use and understand and tend to reason using concrete types. We propose GeckoGraph, a graphical notation for types. GeckoGraph aims to accompany traditional text-based type notation and to make reading, understanding, and comparing types easier. We conducted a large-scale human study using GeckoGraph compared to text-based type notation. To our knowledge, this is the largest controlled user study on functional programming ever conducted. The results of the study show that GeckoGraph helps improve programmers' ability to succeed in the programming tasks we designed, especially for novice programmers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑