You know that moment. You’ve been deep in logic for an hour, your solution is elegant, the architecture is perfect. Then you hit Enter, and the red squiggly line appears. Missing semicolon. Again. You sigh, scroll back, fix it. The flow is broken. The thought dissolves.
This is the dirty secret of every developer’s daily life: we spend more time fighting the text than we do thinking about the code. We’ve normalized it. We call it ‘craftsmanship.’ We even romanticize the blinking cursor, the raw power of a blank file. But what if I told you that the entire premise of editing code as flat text is a historical accident β and a deeply flawed one?
Enter structure editors. These are tools that don’t let you edit text at all. Instead, they manipulate the abstract syntax tree (AST) directly. You don’t type a loop; you insert a loop node. You don’t fix a bracket mismatch; the editor never lets a mismatch exist. The result? Code that is syntactically perfect by construction. No syntax errors. Ever. No formatting debates. No ‘your linter vs my formatter’ wars.
Sounds like a dream, right? So why isn’t everyone using them?
Because developers don’t actually want to stop making syntax errors.
That’s the uncomfortable truth. The resistance to structure editors isn’t about missing features or performance. It’s about identity. We’ve built a culture where the ability to navigate a text file with speed and precision is a badge of honor. The friction of syntax is part of the ‘flow’ β we subconsciously believe that if it’s too easy, it’s not real programming. We want to feel the code, even if that feeling is a paper cut.
I saw this firsthand when I tried to switch to a structure editor for a week. The first day was euphoric. No red squiggles. No ‘missing parenthesis’ errors. I finished a function in half the time. But by day three, I felt lost. I couldn’t just type a variable name quickly. I had to navigate menus, click nodes, think in terms of the tree. The fluidity of text β the ability to type a few characters and have the computer guess what I meant β was gone. I missed the chaos. I missed the craft.
Let’s be honest: the real problem isn’t that structure editors are hard to use. It’s that they challenge the very definition of what it means to be a programmer. We’ve romanticized the text editor as the ultimate tool of the mind. Taking that away feels like losing a part of ourselves.
But here’s the twist: the text editor is already a lie. When you write code, you’re not writing a story β you’re constructing a tree. The text is just a serialization of that tree. The brackets, the indentation, the semicolons β they’re all just noise that the compiler strips away. We’ve been fighting a translation layer that shouldn’t exist.
Think about the most frustrating moments in your coding day. How many of them were caused by a missing colon, a wrong indent, or a bracket that closed the wrong block? Every single one of those errors is a tax on your cognitive load β a tax that structure editors simply eliminate.
The defenders of plain text will say ‘but I need to move fast, I need to type freely.’ To them I say: speed is overrated. What matters is correctness, clarity, and the ability to reason about your code. If you spend 10% of your time fixing syntax errors, a structure editor doesn’t slow you down β it speeds you up by removing that 10% forever.
I’m not saying you should switch tomorrow. I’m saying that the dogma of text editing is preventing us from building better tools. The next generation of developers, raised on visual interfaces and direct manipulation, will look at our terminal-based syntax wars and laugh. They’ll ask: ‘Why did you waste so much time on spelling?’
And you know what? They’ll be right.
FAQ
Q: Aren't structure editors just for beginners? Real developers need to type fast.
A: That's a common bias. Structure editors aren't slower β they remove the time spent fixing syntax errors. The 'speed' of typing raw text is an illusion when you factor in the debugging and linting loop. The trade-off is learning a different interaction model, not a speed penalty.
Q: What's the practical implication for my daily work? Should I switch now?
A: Not necessarily. Most structure editors are still experimental (e.g., Hazel, Lamdu, Unison's codebase UI). But the principle is important: you can start treating your code as a tree, not as text. Tools like tree-sitter and language servers already bring some structure-awareness. The long-term shift is toward editors that understand the AST, even if they still let you type text.
Q: Isn't the real problem that structure editors are just too rigid? What about quick hacks or prototyping?
A: That's a fair point. Structure editors are worse for quick, throwaway scripts where you don't care about correctness. But for production code, the rigidity is a feature, not a bug. The 'hack' mindset is why we have so many runtime errors. If you're prototyping, use a text editor. If you're building something that will last, the structure editor pays off.