Interaction vs. Abstraction: Managed Copy and Paste.

International Workshop on Programming Abstractions and Interactive Notations, Tools, and Environments(2022)

引用 1|浏览10
暂无评分
摘要
Abstraction is at the core of programming, but it has a cost. We exhort programmers to use proper abstractions like functions but they often find it easier to copy & paste instead. Copy & paste is roundly criticized because subsequent changes to copies may have to be manually reconciled, which is easily overlooked and easily mistaken. It seems there is a conflict between the generality and reusability of abstraction with the simplicity of copying and modifying code. We suggest that this conflict arises because we are still thinking in terms of paper-based notations. Indeed the term “copy & paste” originates from the practice of physically cutting and gluing slips of paper. But an interactive programming environment can free us from the limitations of paper. We propose managed copy & paste , in which the programming environment records copy & paste operations, along with structural edit operations, so that it can track the differences between copies and reconcile them on command. These capabilities mitigate the aforementioned problems of copy & paste, allowing abstraction to be deferred or reduced. Managed copy & paste resembles version control as in git, except that it works not between versions of a program but between copies within the program. It is based on a new theory of structural editing and version control that offers precise differencing based on edit history rather than the heuristic differencing of textual version control. We informally explain this theory and demonstrate a prototype implementation of a data science notebook. Lastly, we suggest further mechanisms of gradual abstraction that could be provided by the programming environment to lessen the cognitive load of programming.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要