Mixing Visual and Textual Code
Mixing Visual and Textual Code
Authors:
- Leif Andersen
- Michael Ballantyne
- Cameron Moy
- Matthias Felleisen
- Stephen Chang
📄 Document Metadata
| Attribute | Detail |
|---|---|
| arXiv Identifier | 2603.15855 |
| Primary Category | Computer Science Programming Languages (cs.PL) |
| DOI | 10.48550/arXiv.2603.15855 |
| Publication Status | Forthcoming in JFP |
| License |
🎯 Abstract & Core Thesis
The authors argue that current mainstream programming languages are limited because they rely exclusively on linear text to represent complex, domain-specific geometric concepts.
The Goal: To develop hybrid languages that empower developers to build visual syntactic elements, allowing for a seamless blend of textual and visual syntax specifically tailored to a given application domain.
To be successful, this integration must meet several strict criteria:
- Parity: Visual and textual syntaxes must be treated as equals.
- Workflow Integration: The system must not disrupt the standard programming experience.
- Composability: Visual extensions must be proper language extensions that work with other features.
- Analysis: The ability to perform static reasoning about the program must be maintained.
🛠️ The Solution: Hybrid ClojureScript
The paper introduces Hybrid ClojureScript, the first language to implement these requirements. This system allows developers to:
- Define visual interactive syntax.
- Embed instances of this syntax directly within the program's source text.
How it behaves across environments:
- Enhanced Hybrid IDEs: These render the embedded syntax as mini-GUIs for direct interaction.
- Standard IDEs: These simply display the textual representation of the visual syntax.
Conceptual Model
The relationship between the source and the representation can be viewed as:
📝 Implementation Example (Conceptual)
While the paper discusses the framework, a conceptual implementation of a visual block in Hybrid ClojureScript might look like this in a standard editor:
(defn draw-scene []
(let [circle (visual-syntax :circle {x 10 y 20 r 5})]
(render circle)))
In a hybrid IDE, the (visual-syntax ...) call would be replaced by an actual draggable circle.
📈 Paper Objectives & History
The authors utilize this work to:
- Argue why such an extensibility mechanism is essential.
- Prove that the design is adoptable.
- Explore the requirements for porting this design to other programming languages.
Submission Timeline
- v1: Submitted on Monday, 16 Mar 2026 by Stephen Chang.
- v2: Revised on Friday, 27 Mar 2026.