3 ms·
Only if it's written in a style which affords reading. K programmers seem to want to write their code in a mathematical style, but without the natural language
by msla 7y ago
Only if it's written in a style which affords reading. K programmers seem to want to write their code in a mathematical style, but without the natural language prose which makes mathematical papers readable. In a paper by a mature mathematician, the equations only perform some of the work in expressing the idea. The rest of the work is done by prose written with an intent to be lucidly expository, to allow the notation to be terse because the high-level concepts are being expressed in a natural language.
We have this style in the programming world. It's called Literate Programming. How many K programmers write in that style?
- deleted 7y ago[deleted]
- buzzkillington 7y ago>We have this style in the programming world. It's called Literate Programming. How many K programmers write in that style? More than you would think. I had a very nice gig at a hft years ago where we were using noweb+k extensively. The only place were I edited source code by hand with paper, pen and paste.
- geocar 7y ago> but without the natural language prose which makes mathematical papers readable A mathematical paper introducing some meaningful worker function uses English because mathematical notation is insufficient for describing computation. That's one of the important goals of Iverson's notation. > We have this style in the programming world. It's called Literate Programming. How many K programmers write in that style? Quite a few! I would actually suggest there are more literate K programmers than there are literate C programmers! Every 4-5 lines of code probably has 2-3 lines of prose in a large application that I work on, but in another language that might be something like 500 lines of code for 2-3 lines of prose which puts the prose offscreen for most of the code it's describing. Some C programs will try to keep the prose-to-code density higher than that, but even amongst Knuth's code that's rare.