Similarly, if I'm creating an editor for a flow based programming langauge, I might not want to limit my editors serialization formats to valid FBP programs, but I'm pretty sure that I do want to limit its serialization formats to valid di-graphs.
Regards,
Timothy Hobbs
Why?
This sounds like untested opinion.
I used
to opine about strong typing. I *thought* it would help me.
Instead it hindered my design. Architecture matters more than
coding. Code is cheap. Architecture is hard.
We went all the way back to very primitive diagram elements - straight line, curvy line, ellipse, text, point - and found this to be extremely workable. Back in the '80's, it was thought "impossible" to use a backtracking parser, but nowadays it is laughably simple (my favourite is PAIP Prolog for Common Lisp). We've done it in a browser using JS, too. Extremely simple drawing elements, sent to the server for compiling.
The
point of all this simplicity is - simplicity.
And
flexibility.
What if it makes more sense to represent the innards of a component as a ping-pong diagram (aka Sequence Chart, see Harel's "Come, Let's Play")? Using a simple, keyboard-based drawing tool, I could draw it. Then I would use a different 2D parser and analyzer to figure out what the diagram means and what code should be emitted.
pt
I tend to agree with your Venn diagrams, so maybe we're just misunderstanding one another.
I string the bubbles out from left to right, though. Outer-most bubble to the left, inner-most to the right.
> what historic editors existed that didn't allow for incorrect programs?
They were called "structure editors" back then. There were many attempts. The Synthesizer Generator was the most famous (IMO):
https://www.ics.uci.edu/~taylor/ics228/SynGen.pdf
> ... a compiler for C doesn't include a handwriting recognition engine
In fact, my ideal for FBP would be to draw diagrams on paper (or whiteboard) and then input them using a scanner.
I know that this can be done, because my Apple Newton (ca. mid-1990's) accepted hand-drawn diagrams and "fixed them up".
> I might not want to limit my editors serialization formats to valid FBP programs, but I'm pretty sure that I do want to limit its serialization formats to valid di-graphs.Why?
This sounds like untested opinion.
I used to opine about strong typing. I *thought* it would help me. Instead it hindered my design. Architecture matters more than coding. Code is cheap. Architecture is hard.
We went all the way back to very primitive diagram elements - straight line, curvy line, ellipse, text, point - and found this to be extremely workable. Back in the '80's, it was thought "impossible" to use a backtracking parser, but nowadays it is laughably simple (my favourite is PAIP Prolog for Common Lisp). We've done it in a browser using JS, too. Extremely simple drawing elements, sent to the server for compiling.
The point of all this simplicity is - simplicity.
And flexibility.
What if it makes more sense to represent the innards of a component as a ping-pong diagram (aka Sequence Chart, see Harel's "Come, Let's Play")? Using a simple, keyboard-based drawing tool, I could draw it. Then I would use a different 2D parser and analyzer to figure out what the diagram means and what code should be emitted.
pt