Projectional editor

From apm
(Redirected from Projectional editors)
Jump to: navigation, search

Closely related but not identical: Structural editor


Projectional code editors are special code editors that
do not show the source-code of a program to the user/programmer directly but rather ...

  • have all source-code in a hidden internal representation (not necessarily optimized for human readability, stored in the AST … abstract syntax tree)
  • "project" this internal representation of the language onto one (or several) user/programmer facing representation(s)

Projectional editors allow to show the same piece of code in various ways. This can mean ...

  • different kinds of programming language syntax
  • one or more visual programming projections
  • very problem specific projections that just work on a subset of the language, On a DSL (domain specific language)

Specific DSL projections may include ...

Relation to structural editing

Code projections can, but not necessarily need to (!), put restrictions on code editability.

Projectional editing but not structural editing:
If code is dumped from AST to plaintext and slurped up from plaintext to AST
then there are obviously no restrictions to what can be typed.
Projectional editing and structural editing:
If the code editor is not a typical text editor but a special editor that already
only allows code edits to states that will be representable within the internal representation.
Note that this can be impractical to use if improperly designed. See: Structural editor

Advantages

Projectional editors can simplify working on problems as
projectional editors allow to use the right tool for the right job

Also while allowing so they still retain only one single unified language in the hidden background.
Having a single language in the background can prevent proliferation of software tools/frameworks
with ad-hoc hacked together informal bug-ridden language-plumbing-interfaces to the point of
Ruben Goldberg machines and fragile Frankestein systems riddled with hidden out of sync state.
See related pages: Content addressed & Purely functional programming

Projects aiming to become at a practically usable programming language soon

Experimental toy/research projects


By the author so called "tile-based editing":

Related


External links