Groups | Search | Server Info | Login | Register
Groups > comp.programming.literate > #97
| From | Edward McGuire <metaed@metaed.com> |
|---|---|
| Newsgroups | comp.programming.literate |
| Subject | Re: "hello, world" Literate Programming example in Noweb |
| Date | 2024-11-01 21:23 -0600 |
| Organization | A noiseless patient Spider |
| Message-ID | <slrnviahks.hge.metaed@newjersey.metaed.com> (permalink) |
| References | <slrnvi7bag.hge.metaed@newjersey.metaed.com> <87ttcqzxy9.fsf@jemoni.to> |
On 2024-11-01, Wolfgang Agnes <wagnes@jemoni.to> wrote: > Welcome to the literate programming world. Thank you, especially for the really thoughtful response. This kind of constructive reply is exactly what I wanted. > perhaps the first chunk should be /hello main body/ because that is precisely > what we expect from a hello-world. I agree. Part of what's fun about this design process is, instead of starting literally at the top and sectioning down, or at the bottom and chunking up, you can start at the middle, then both section down and chunk up. Knuth discovered this was true for him also, and mentions it in the "Literate Programming" paper. The tutorial should be reordered to demonstrate that. > by calling your chunks as holons, you're eclipsing the name ``chunk'' which > seems to be the understand one. Something to think about. > [...] > I see you explain the NOWEB terminology. I wonder if Knuth was the one > who started with the term /chunk/ as well. If so, then I'd advise > against /holon/. My choice of _holon_ reflects my intention that the tutorial be, or become, less about a particular tool, and more about what literate programming _is_, while still showing a working example. Knuth uses neither _chunk_ nor _holon_. In the "Literate Programming" paper, he acknowledges de Marneffe's Holon Programming Language as the primary influence on the design of WEB, but does not follow de Marneffe's terminology. In the WEB manual he uses _module_, and in CWEB he uses _section_. Ramsey (noweb) uses _chunk_. Briggs (nuweb) uses _scrap_ and _macro_. In short, there is no agreed-on term. The term _holon_ captures good design better than the others. It describes a relatively independent "organic" or "granular" unit of code, whose form and purpose is easily graspable by the reader, and whose boundaries easily allow for sectioning down and chunking up, validation, testing, refactoring, etc. And that's what a good literate programmer aims for. > (*) Cosmetics Again thank you. > More often than not, users don't have NOWEB installed, so they wouldn't > be able to do anything with your program but read it. I need to add an appendix, that shows how a person could easily get Noweb running and actually execute the tutorial code. Cheers! Edward
Back to comp.programming.literate | Previous | Next — Previous in thread | Next in thread | Find similar
"hello, world" Literate Programming example in Noweb Edward McGuire <metaed@metaed.com> - 2024-10-31 16:17 -0600
Re: "hello, world" Literate Programming example in Noweb Wolfgang Agnes <wagnes@jemoni.to> - 2024-11-01 17:28 -0600
Re: "hello, world" Literate Programming example in Noweb Edward McGuire <metaed@metaed.com> - 2024-11-01 21:23 -0600
Re: "hello, world" Literate Programming example in Noweb Wolfgang Agnes <wagnes@jemoni.to> - 2024-11-01 23:11 -0600
csiph-web