跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2611.39048 (cs)
[提交于 2026年11月28日]

标题:An Empirical Study on the Impact of String Interpolation on Program Readability and Comprehension

作者:Daniel Ogenrwot, John Businge, Andreas Stefik
查看论文《An Empirical Study on the Impact of String Interpolation on Program Readability and Comprehension》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Literal string interpolation lets developers embed variables, expressions, and function calls within strings (e.g., f"Hello, {name}!"), reducing the need for explicit concatenation. Although often considered more concise and expressive than concatenation, its effect on program readability and comprehension remains underexplored. We report a randomized controlled experiment with a within-subjects repeated-measures design in which 314 participants with prior programming experience, recruited mainly through a university computer science department and LinkedIn, completed randomized programming tasks under two conditions: concatenation and interpolation. A custom-built tool automatically recorded completion time and response correctness. Participants took longer on concatenation tasks, particularly for complex expressions. A repeated-measures ANOVA revealed a significant main effect of task category on completion time, F(1, 5026) = 92.35, p < .001, $\eta^2_G$ = .018, and a smaller main effect of academic level, F(6, 5026) = 2.41, p = .025, $\eta^2_G$ = .003. The interaction was not significant, F(6, 5026) = 0.03, p = 1.00, showing that the effect of task category was consistent across academic levels. Accuracy was high, with a moderate positive correlation between participant and correct responses (r = .55, p < .001). Qualitatively, participants described interpolation as cleaner and more intuitive, whereas preference for concatenation was driven mainly by familiarity. Participants also emphasized clear formatting, variable highlighting, and IDE support, suggesting that readability depends on tooling and conventions as well as syntax. The findings suggest that literal string interpolation can enhance code readability and reduce cognitive effort during comprehension, with implications for programming language design and the standardization of interpolation syntax.
评论: 41 pages, 12 figures. Accepted in ACM Transactions on Computing Education
主题: 软件工程 (cs.SE); 人机交互 (cs.HC); 程序设计语言 (cs.PL)
引用方式: arXiv:2611.39048 [cs.SE]
  (或者 arXiv:2611.39048v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2611.39048
相关 DOI: https://doi.org/10.1145/3872269

提交历史

来自:Daniel Ogenrwot
[v1] 2026年11月28日 星期六 19:18:09 UTC (1,007 KB)
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.SE
< 上一篇   |   下一篇 >
最新 | 近期 | 2026-12
切换浏览方式为:
cs
cs.HC
cs.PL

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站