Code Ordering

Standard programming languages like C, C++, Java, SmallTalk, etc. exhibit CodeOrdering: conceptually, each statement is executed one at a time, possibly modifying state, and then the next statement is executed, possibly using state modified by the previous statement.

Several programming systems have been created that relax this code ordering.

In all of these, the order in which the code may be written does not correspond to the order in which it would need to be written for a sequential programming language - but there is a single order.

I am particularly interested by the possibility of dynamic code reordering: allowing the program to be sorted into any form convenient for the programming task at hand, and then edited in that form. In DataBase language, this is called an EditableView?.

For example, one might create a view by grepping all usages of a variable. One could then edit in this view, and automatically have the change reflected in other views, including the canonical sequential order.

In a pipeline, one could create a view that followed a variable all along the pipeline; or, one could create a view that examined all variables in a pipestage, or just the protocol across a pipestage boundary.


There might be a way to write a practical implementation of this in a very short time. Call it a prototype:

This way, you'd be able to test your hypothesis. You'd have a tool that could produce various editable views of a piece of code. You'd be able to see for yourself if programming is made any easier by those tools. (To be scientific, you'd have to compare whether it's easier than programming in your XML programming language without such tools. Comparing XML to C is no fair.)

What do you think? Easy, hard, or impossible prototype? -- EdwardKiser

Edward - it's a good idea, and I don't think it would take much work to do. Basically you are leveraging existing C compilers for code generation and existing HTML/XML browser technology for display. What is needed now is a better pinning down of what the useful 'views' are. --JamesCrook

The merge functionality is difficult to impossible. Deletion isn't much of a problem, in-place editing isn't much of a problem, but spatial relocation or insertion are a problem unless you make the relevant spatial transformations two-way. I'm assuming you want some higher granularity than simple module level. --RichardHenderson .

Split and merge is refactoring. It need not be that difficult if there is fine granularity of functionality and we are just talking about moving the 'atoms' about into different aggregates. We need examples to make this discussion more concrete.

Some very similar ideas are expressed in a project of an XML-based transforming text editor by DmitryKirsanov? at http://www.kirsanov.com/te/te.html .


See also DefinitionOrdering


CategoryCoding


EditText of this page (last edited December 2, 2014) or FindPage with title or text search