3 ms·
I would love to have a tool that would display code as some kind of annotated AST, rather than the layout imposed by most IDEs or tools such as gofmt. Put a ba
by Roboprog 6y ago
I would love to have a tool that would display code as some kind of annotated AST, rather than the layout imposed by most IDEs or tools such as gofmt.
Put a bag over Java’s ugly face, that kind of thing.
I don’t want to look at IntelliJ’s “staircase of doom” formatting, I want to see one parameter per line when there is more than one parameter.
I don’t want to trace down data “COME FROM”s (local variables that are only used once and have to be tracked down from whence they came).
Give me an alternate layout which directly tracks between the text and the diagram, similar to a structure layout, but showing details within functions/methods as a tree, as well. Show me clearly how values/expressions funnel or pipeline into each other, but filter out some of the noise.
And auto-display fuglyCaps names as kebab-case, while we’re at it :-). Cuz, science.
- mjul 6y agoWhat you are describing is closely related to some of the ideas of Intentional Programming. The core idea is that the code is just a model (AST, graph...) and your editor projects it to whatever format or syntax you like. Development then is coding in these representations of the model or building new smart abstractions and model transformations (DSLs) for going from your screen representation to lower-level building blocks and eventually compiling to e.g. something that runs on the JVM. It quickly becomes just as complicated as it sounds. The best implementation in my experience is that of JetBrains’ free tool MPS (Meta Programming System). They start with the model (your AST) rather than the code. The learning curve is steep and it is difficult to adopt it in teams where people are more focused on shipping features than building exotic tooling to help them do it.
- Roboprog 6y agoThanks. That goes on my to-do list, then.