I went to great pains to explain that what symbols mean would have to be
explained by the symbol/function creator in a comment inside the
symbol/function definition. The editor would pull the explanation from that
comment. The comment would have some identifier, such as "Usage:" or
"Tooltip:" to prefix the comment, so that the editor knew it was a special
comment. Each function/symbol would have to be manually commented in this
way before the editor knew about it - after all, we can't expect an editor
to speak to humans in an understandable way about what a function does
without telling it so - because if it could we probably wouldn't need human
programmers any more.

I've been doing a lot of research on this and I hit a jackpot of
information. What I'm basically describing and edging towards is called a
projectional editor. Jetbrains MPS is probably the most advanced
projectional editor out there, which does not need a parser, because it
directly manipulates the AST (abstract syntax tree). It displays the code
in a number of views - the 2 minute video is worth more than a thousand
words: https://www.youtube.com/watch?v=XolJx4GfMmg

Jetbrains MPS appears to be an extremely complex piece of software, the
interface, while functional, is about as complicated as an airplane
cockpit, and I'm just not a fan of that kind of thing. Programming should
be simple and elegant like lisp, even within a projectional editor. I
suspect there's a better way to make a projectional editor by building the
abstract syntax tree using s-expressions, which would make it easier and
simpler to implement DSL's while keeping the end-result pretty, but this is
just a hunch, more research is required..
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Readable-discuss mailing list
Readable-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/readable-discuss

Reply via email to