Hacker News new | ask | show | jobs
by falcor84 846 days ago
>the code did not have to be in execution order

I'm not clear on this. Is it not just about having the function definitions in an arbitrary order just like all of us mortals do? Is there anything special about the code structure that Knuth proposes?

2 comments

No, Knuth's cweb has the notion of chunks, which is just lines of code. It wires the chunk in dependency order. A chunk can have multiple functions, or no functions, or parts of functions; cweb doesn't care.
Part of the motivation might have been that he set up WEB for Pascal, which does enforce an order of declarations. Once he started working more with C, perhaps there was less reason; but he found that he enjoyed working in that manner. I haven't looked at anything released in that format for years, though.