混合视觉与文本代码
Mixing Visual and Textual Code

原始链接: https://arxiv.org/abs/2603.15855

目前的编程语言完全依赖线性文本,这往往难以捕捉复杂的、特定领域的几何概念。为此,本文引入了 **Hybrid ClojureScript**,这是一种开创性的混合编程语言,将可视化语法与文本语法视为同等重要。 与以往的可视化编程尝试不同,Hybrid ClojureScript 能无缝集成到开发者的现有工作流程中。它允许创建可与标准语言特性组合的可视化语法结构,同时保持静态推理能力。该系统利用增强型集成开发环境(IDE)将这些结构渲染为交互式迷你图形界面,并保留了文本回退表示,以确保与其他编辑器的兼容性。 通过展示一种实用的可扩展性机制,作者认为该方法成功弥合了代码与可视化表示之间的鸿沟,并为未来的语言设计提供了可扩展的蓝图。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 融合视觉与文本代码 (arxiv.org) 6 点,由 doppioandante 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 准则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

View a PDF of the paper titled Mixing Visual and Textual Code, by Leif Andersen and 4 other authors

View PDF HTML (experimental)
Abstract:The dominant programming languages support nothing but linear text to express domain-specific geometric ideas. What is needed are hybrid languages that allow developers to create visual syntactic constructs so that they can express their ideas with a mix of textual and visual syntax tailored to an application domain. This mix must put the two kinds of syntax on equal footing and, just as importantly, the extended language must not disrupt a programmer's typical workflow. This means that any new visual syntax should be a proper language extension that is composable with other language features. Furthermore, the extensions should also preserve static reasoning about the program. This paper presents Hybrid ClojureScript the first such hybrid programming language. Hybrid ClojureScript allows programmers to add visual interactive syntax and to embed instances of this syntax within a program's text. An enhanced hybrid IDE can then display these embedded instances as mini-GUIs that programmers interact with, while other IDEs will show a textual representation of the syntax. The paper argues the necessity of such an extensibility mechanism, demonstrates the adoptability of the design, and discusses what might be needed to use the design in other languages.
From: Stephen Chang [view email]
[v1] Mon, 16 Mar 2026 19:38:07 UTC (2,124 KB)
[v2] Fri, 27 Mar 2026 23:15:52 UTC (2,123 KB)
联系我们 contact @ memedata.com