14 ms·
Actually, the old Forth block editors did this with their screens and shadow-screens. The normal unit of editing work in original Forth was a 1024 byte "page"
by oofoe 8y ago
Actually, the old Forth block editors did this with their screens and shadow-screens.
The normal unit of editing work in original Forth was a 1024 byte "page" called a SCREEN. You would write your code in an editor that arranged it as 16 lines of 64 characters. At the touch of a key (usually), you could swap to the shadow screen which would have the documentation on it. By convention, shadow screen comments were placed on the same line as the code they were remarking on, so everything was usually co-located.
By abusing autorepeat, it was even possible to "flicker" the code and documentation to see both at once.
Something like CWEB or org-mode permits interleaving code with comments, but it's one dimensional and breaks your flow when editing.
- noir_lord 8y agoThat's why it'd have to be layers and you'd have to have some clever way of keeping what in each layer goes with which code. I started playing with it a while back in terms of how you'd structure it and what I came up with was something like foo.cs foo.shallow foo.deep So that all existing tooling would work, foo.cs would just be regular old code and only if your editor supported layers would it care about .shallow and .deep, I didn't like that it would clutter up files. If I ever get the time I'd like to implement a rough prototype in intellij.