Projectional editor
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 ...
- projection for 3D modeling, processing of data of various types with natural representations, ...
- all the projections (and more) that are listed on the page: Higher level computer interfaces for deveusers
Contents
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
- unison – https://www.unisonweb.org/ – fist implemented code-projection is projection into plain text-files (no structural editor yet as of 2022-12)
- enso (former luna) – https://enso.org/
Experimental toy/research projects
- fructure – Andrew Bilnn – fructure editor (website) – (ninth RacketCon): Andrew Blinn – Fructure: A Structured Editing Engine in Racket – upload 2019-07-19
– there is a focus on typing normally – interesting aspect: algebra for the curser - hazel – https://hazel.org/
- ( isomorf – https://isomorf.io/#!/ – login wall )
- lambdu – http://www.lamdu.org/
- List of structural editors. Most are projectional too.
https://github.com/yairchu/awesome-structure-editors/blob/main/README.md
By the author so called "tile-based editing":
- https://tylr.fun/ – (some info in twitter) – single line structural editing interactive demo – focus on typing normally
Related
- Structural editor
- Node editor aka box and wire visual programming.
- Edit time immutability
- Programming languages
- Software
- Annotated lambda diagrams and Annotated lambda diagram mockups – also a code projection
- Higher level computer interfaces for deveusers
External links
…