Something that always comes up in the discussion of structure editors is what to do about comments. Often a looser coupling of comments to the code is suggested. This article presents a good argument for a tighter linking of comments with code, which would be well-supported by a structure editor.
I think this would be cleaner than the proposed syntactic approach, which is clever but ugly (and so is likely to face resistance to adoption).
Another approach might be deeper editor integration of blame/annotation modes from version control, and versioned comments that were associated with specific lines in the file rather than being inline comments.
function initializeDevices(c) {
// initialize the necessary devices:
// listener, translator, etc
c.go();
}
initializeDevices(c); // this call cannot be moved down
bool ans = process_test_request();
if (ans)
report_success();
I think this would be cleaner than the proposed syntactic approach, which is clever but ugly (and so is likely to face resistance to adoption).
Another approach might be deeper editor integration of blame/annotation modes from version control, and versioned comments that were associated with specific lines in the file rather than being inline comments.