4 ms·
I tried writing some Java code with noweb - and at least for Java 1.3 - the ability to reuse code at any level (like a while loop working with an ADT) helped av
by e12e 8y ago
I tried writing some Java code with noweb - and at least for Java 1.3 - the ability to reuse code at any level (like a while loop working with an ADT) helped avoid some of java's tedious verbosity. This helped keep the narrative / document to a manageable length - but it lead to rather confusing Java output (only really a problem if people try to read just the code, ignoring the document).
Overall, I've come to feel that with more powerful languages - some doctests and block comments can go a long way in achieving similar results.
Although for reading proper laid out text with a nice font and good support for mathematical notation does help.
But with a language with rich abstractions, and a sane use of Unicode (from the simple case of using π as a constant, to the more sophisticated of having arrows and actual not-equal signs) - along with a freedom of ordering, so you can do:
complex_procedure:
simple_subtask1
simple_subtask2
simple_subtask1
...
And not get a reference error, because simple_subtask1 is referenced before it's declared - all go a long way in facilitating source code that reads more like prose than code.
[ed: I should add, that I don't really think simple text formats are the best way to offer rich editing experiences - we see this with most IDEs - that "understand" code - but I think the lisp/smalltalk idea of images and being able to go back and forth between byte code and text form really is the way forward.
Like word processors, spreadsheets and image editors all use rich file formats for their working sets.
One such approach is the leo editor:
http://leoeditor.com/ http://leoeditor.com/
]