I must be misunderstanding, how can this be more useful than plain text? Eliminating syntax errors?
I must be misunderstanding, how can this be more useful than plain text? Eliminating syntax errors?
while (...) {
Automatically inserted the next `}` and moved the cursor between it. But in the frame based editor, the `{` and `}` are elided from the presentation, replaced with a colored block or frame around the inner kernel of the while loop. +++ while (condition)
+ --- if (condition)
+ - *** actions
+ ------------------
++++++++++++++++++++++
Scratch (the example in Figure 1) is definitely a mouse driven interface, but beyond that and its visual presentation, it's more a cousin to the frame based model than a precise representation.It gives you a better (arguable?), structural way to view code, and to edit it with both text input and mouse.
(curmudgeon)A well-formed program is "defined" as what the compiler expects. Like literate programming, this hides from me what's being presented to the compiler, and sets me adrift from what the program actually is.(/curmudgeon)
It also reminds me vaguely of writing with Framemaker.
Isn't that the whole point of abstractions? Like, when you write a function call, you see "foo()" but the compiler sees all the individual instructions in the function. The same with macros, templates, etc.
And on a purely visual level, the example 'jtsummers gave just seems to be an extension of code folding and other tools that let you focus on one part of the code while ignoring another.
Abstractions are the wrong thing to chase.
Just because an abstraction will put you further away from a technical problem, doesn't mean will get you closer to solving your business problem.
Abstractions are transient. You want to use them when they help you, but it's good to be able to step down and verify what's going on.
Good, yes, desirable, often, but I wouldn't call it "essential" to the art of programming.
I once worked for a company whose data was managed by a COBOL application on a mainframe a couple hundred miles away; there was no walking down that abstraction ladder (without shelling out a five-figure support fee), so our in-house IT department had to take advantage of the fact that the 3270 terminal emulator we used to access the mainframe, could be driven through a COM interface.
I'm sure there are lots of other examples of jobs that don't have the luxury of being able to step down and verify lower-level code, and I wouldn't characterize them as missing out on some "essential" aspect of programming.
(idealist)Well, there's no reason the compiler has to accept programs only as plain text. It's actually a pretty poor representation of your program: the language has to go out of its way to parse it. Internally, your program is an AST; this editor works over frames, which are closer to the AST than they are to plain text; perhaps they could both use the same non-textual file format.(/idealist)
For that you have Lisps, which hit the sweet spot by being human-writable ASTs that are trivial to parse (at least if you don't play with reader macros too much).
An Imp is attacking my Feline Familiar - and my fireball wand grazing by a shit-ton of monsters and items and four long-bows..