The Elephant in the Syntax: A Comparative Study of Semantics‑First, Block‑Based, and Textual Programming
Abstract
Syntax remains a major barrier for novices. Although block-based systems reduce or eliminate syntax errors, conditionals still challenge learners, likely because their semantics remain implicit. In this paper, we address this problem by introducing a semantics-first, state-visible programming approach inspired by the classic visual language Stagecast Creator. To demonstrate its usefulness, we designed Elephant, a unified, Karel-like research platform that supports three equally expressive programming paradigms: (i) semantics-first programming, (ii) block-based programming with the Blockly library, and (iii) text-based programming in JavaScript with domain-specific libraries. We then deployed Elephant in two within-subjects studies with secondary-school students (N = 39) to compare semantics-first programming to textual and block-based baselines, keeping the program semantics constant across modes and reducing cross-tool confounds. Results indicate, among other things, that semantics-first programming yields significantly higher task performance, suggesting that increasing the visibility of the program state during program composition could support greater outcomes in secondary computing education.
- Venue
- CHI 2026
- Volume
- Proceedings of the 2026 CHI Conference on Human Factors in Computing Systems
- DOI
- 10.1145/3772318.3791667
- https://dl.acm.org/doi/pdf/10.1145/3772318.3791667
- Anthology ID
2026.chi.1366
Cite
@inproceedings{weidmann-etal-2026-elephant,
title = {{The Elephant in the Syntax: A Comparative Study of Semantics‑First, Block‑Based, and Textual Programming}},
author = {Theo B. Weidmann and Sverrir Thorgeirsson and Karl-Heinz Weidmann and April Yi Wang and Zhendong Su},
booktitle = {Proceedings of the 2026 CHI Conference on Human Factors in Computing Systems},
isbn = {9798400722783},
year = {2026},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
doi = {10.1145/3772318.3791667},
url = {https://doi.org/10.1145/3772318.3791667},
abstract = {Syntax remains a major barrier for novices. Although block-based systems reduce or eliminate syntax errors, conditionals still challenge learners, likely because their semantics remain implicit. In this paper, we address this problem by introducing a semantics-first, state-visible programming approach inspired by the classic visual language Stagecast Creator. To demonstrate its usefulness, we designed Elephant, a unified, Karel-like research platform that supports three equally expressive programming paradigms: (i) semantics-first programming, (ii) block-based programming with the Blockly library, and (iii) text-based programming in JavaScript with domain-specific libraries. We then deployed Elephant in two within-subjects studies with secondary-school students (N = 39) to compare semantics-first programming to textual and block-based baselines, keeping the program semantics constant across modes and reducing cross-tool confounds. Results indicate, among other things, that semantics-first programming yields significantly higher task performance, suggesting that increasing the visibility of the program state during program composition could support greater outcomes in secondary computing education.}
}