3 ms·
I find that literate programming is a little less relevant with programming languages that offer better abstractions and modularisation. With literate programmi
by e12e 9y ago
I find that literate programming is a little less relevant with programming languages that offer better abstractions and modularisation. With literate programming, you're free to structure your code in chunks, like:
read numbers from file into array
iterate over array
add each element to sum
display sum
Where you in Pascal/c would have to explicitly allocate temporary variables that doesn't really have anything to do with what you want to achieve.
Today we have languages with list-comprehension and iterators - and even c has good support for inlining functions - so you don't have to choose between abstract/clean and fast/clever.
C++17 even has some support for compile-time code execution, if I'm not mistaken.
Between all this, the structural improvements of a well-written literate program, are less important.
And finally - "archiving" or exposing features as programs or libraries - allow for a solid api and easy sharing and re-use of code/functionality across teams much more easily than copy-pasting chunks of code.
WEB-like systems do give languages like c, Pascal or java a macro-like extension with focus on ease of comprehension. But as we have better languages, that isn't very important anymore.
I do know of one example of an attempt to move a huge project to the literate style, the lisp symbolic system Axiom:
http://www.axiom-developer.org/axiom-website/currentstate.html http://www.axiom-developer.org/axiom-website/currentstate.ht...
> Literate sources is the main thread of developing Axiom
(...)
> LITERATE SOURCES Motivation: Axiom needs to be well documented to live. To achieve this end it is being rewritten into literate software form.