3 ms·
"Unfortunately, the notion of editing an AST is by definition language specific, so it's unlikely that someone could create the structural editor and just have
by DannyBee 13y ago
"Unfortunately, the notion of editing an AST is by definition language specific, so it's unlikely that someone could create the structural editor and just have it work for everybody.
"
This is, well, false.
See, for example, the harmonia project at berkeley(http://harmonia.cs.berkeley.edu/harmonia/index.html http://harmonia.cs.berkeley.edu/harmonia/index.html), and ensemble before that (http://harmonia.cs.berkeley.edu/harmonia/publications/ensemble-pubs.html http://harmonia.cs.berkeley.edu/harmonia/publications/ensemb...)
This stuff has been done forever, and it's been "the next generation" forever. Things like separation of structural editing from the language specficness of an AST while still providing a sane and useful editor are paths that have been tread before.
Not that this means people shouldn't try, but as you can see from just these two links, there has been a lot of research and effort put into this area in general. This is an area where i'd read a lot more than i'd sit down and code, because a lot of smart people have been this way before.
Case and point: Susan Graham (and maybe Tim Wagner), who lead the Harmonia project (and many projects before that), is basically the goto person in the world if you ever wanted to know anything about incremental analysis of programming languages (she also helped write gprof, among other things)
- fauigerzigerk 13y ago>This is, well, false. I don't think it can be called true or false that easily. Sure you can translate multiple languages into one AST representation (maybe embellished to allow round-tripping). But is it still the same language? I would say no. But I would go further and say that not even a language specific AST is the same language. I think the idea that we can seperate programming languages from their surface syntax and still claim they are the same languages is misguided. Yes programming languages have semantics, but the user interface aspect is an inherent part of their identity because it is an inherent part of what it means for humans to use language. There is no such thing as syntactic sugar.
- seanmcdirmid 13y ago> This is, well, false. Harmonia was more about language-aware editing, Ensemble and Pan were more about structured editing. > This stuff has been done forever, and it's been "the next generation" forever. The Harmonia stuff never worked that well when I tried it. I've also read many of Graham and Wagner's papers on their tooling, and you know what.... > This is an area where i'd read a lot more than i'd sit down and code, because a lot of smart people have been this way before. ...it turns out we can do much better than what they did given per language consideration. Once I decided not to use Harmonia for the Scala IDE, I came up with a way to incrementalize Martin's compiler fairly easily. It wasn't that hard in hindsight, but none of those fancy algorithms were really necessary at all! Instead, we just needed an incremental computation framework like Glitch [1] to do the heavy lifting transparently, which eventually led to my work in live programming. So the moral of this story: don't trust everything you read from an academic conference. Often work is incomplete, not appropriate for your context, outdated, or even unworkable. Usually, its incomplete and there is lots of room for improvement. [1] http://research.microsoft.com/apps/pubs/default.aspx?id=201333 http://research.microsoft.com/apps/pubs/default.aspx?id=2013...