1. 18

  2. 4

    I like the idea of this a lot, especially in the context of languages that already put you close to the AST or provide macro functionality but it sounds a lot like retreading a lot of the territory of Smalltalk development environments. Using a tool like this as a teaching tool would be interesting (move them on to vim or emacs if they show promise!).

    I wish they would have included a video (even if they had no plan to release the source).

    1. 4

      This is also known as syntax directed editing and, as the article mentions, has been tried before. Many times before.

      Here’s Bernard Lang in 1984 describing the experience at INRIA with a tool called Mentor. Mentor was started in 1974 and was used to teach Pascal in some universities starting in 1977.

      We must however note that even with a good user interface, the syntax directed paradigm is too complex and bothersome for inputting programs or for performing simple editing tasks. […]

      The use of a syntax directed environment for trivial tasks is expensive.

      In short, it he says that while it helped new users write small programs, once they were experienced, they seemed to drop it. However, it was useful for maintenance tasks.

      This ended up being the prevailing opinion. In general, people thought that it seemed like a good idea, but didn’t really work.

      Back in college, after we had all played with structure editors for a time, one member of our group identified the source of our discomfort by noting that many simple common operations in a text editor were much more complicated in a structure editor.

      Essentially, it seems that if you use a structured editor, you want to be able to break the rules “in the small” but be able to navigate easily “in the large”. This is basically what is achieved with modern text editors that are language aware.

      A related idea is intentional programming, which has also not taken off, for similar reasons.

      1. 1

        Edward Kmett (a well-known figure in the Haskell community) once said in conversation that his major problem with structure editors is that routine workflows require breaking the structure, for shorter or longer periods, which is essentially the point being mentioned here. A really nice example is if you have a large data file in some other language, and you want to massage it with regular expressions until it fits the syntax of the language you’re working in. That may be less-than-ideal design, but it’s the right trade-off sometimes, and a structure editor can’t do it.

        I’m still a fan of structure editors. When I get far enough with Modern Data and an editor for it (both are essentially vaporware right now), my intent is that it will have a concept of a document that breaks the rules in some way that it understands the parameters of. I suppose it could still turn out not to be useful, even with such things relaxed, but I still want to invest more effort in trying. :)

      2. 3

        I couldn’t find a link to the code anywhere!

        1. 3

          They said they’re not open sourcing it