Embedded Domain-Specific Editors

A REPL can act as an end-user interface provided the language (or a DSL embedded therein) provides adequate support for the target domain.

For example, GHCi can be used as a simple calculator, and for this simple use-case a user needn't be familiar with intricacies of Haskell's type system. However, if necessary, a user can incrementally learn language features beyond that of a calculator, and code can be edited incrementally to utilize these advanced features with relative ease.

Are there any papers on visual languages or paradigms that attempt to bring this idea to GUIs? Specifically, I'm looking for a visual language which supports the creation of rich embedded domain-specific GUIs that, on the surface, behave like traditional GUIs but support powerful and incremental means of abstraction. Many, if not most, GUI applications could arguably benefit from some mechanism of abstraction, but textual interfaces are insufficient for a wide class of problems.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

"Excellent" question

Forgive the terrible pun. I have to think that the grand tradition of building end-user applications as Excel worksheets is an excellent source of examples.

Embedded?

What do you mean by 'embedded'? Gui's embedded in what? What's a domain specific gu? Isn't every gui specific to the domain of the application?

Yes

Most GUIs are specific to their domain but don't provide anything resembling functions, data structures, libraries, etc. This makes them extremely usable for a very narrow domain but often ill-suited for problems for which the original developers did not explicitly plan.

This same problem arises in domain specific languages. For example, many configuration files have a specialized syntax, but since most don't provide methods of abstraction, certain things are either clumsy or impossible to implement. Emacs and XMonad solve this problem by using an embedded domain specific language, where specialized syntax is implemented in terms of the host language -- in this case Elisp and Haskell respectively. Emacs in particular is a testament to the power of this approach.

If DSLs are analogous to GUIs, I'm searching for the analogue to embedded DSLs: a paradigm which supports graphical interaction while still retaining the full power of a general purpose programming language.

Thanks for clarifying. I

Thanks for clarifying. I once used Jython to allow scripting of a Netbeans RCP application. But that's not what you're talking about. You're looking for a visual language with an embedded DSL that could correspond to some arbitrary domain specific gui. What visual language uses gui widgets in it's syntax I wonder...

Tangible Functional Programming

Have you seen this work by Conal Elliott? It's not about "visual languages" though.

Thanks!

No I hadn't, and this is very interesting -- definitely in the direction of what I'm after.

Another Graphical Language

A description of another graphical language, Modelica, can be found here:
http://www.modelica.org/documents/ModelicaOverview14.pdf

The programs can be entered as text or with a graphical editor. This way beginners can create programs with the graphical editor, while advanced users can use a text editor.

The language is declarative (you enter equations), but it also has imperative features.