Literate programming: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
ortografia |
ortografia |
||
Riga 14:
=== Vantaggi ===
Secondo Knuth, il literate programming<ref name="Knuth">{{Cita web|url=https://www.informit.com/articles/article.aspx?p=1193856|titolo=Interview with Donald Knuth|data=25 aprile 2008|citazione=Yet to me, literate programming is certainly the most important thing that came out of the [[TeX]] project. Not only has it enabled me to write and maintain programs faster and more reliably than ever before, and been one of my greatest sources of joy since the 1980s-it has actually been indispensable at times. Some of my major programs, such as the MMIX meta-simulator, could not have been written with any other methodology that I've ever heard of. The complexity was simply too daunting for my limited brain to handle; without literate programming, the whole enterprise would have flopped miserably.... Literate programming is what you need to rise above the ordinary level of achievement.|accesso=4 gennaio 2009}}</ref><ref>{{Cita|Knuth}}. {{Citazione|Another surprising thing that I learned while using WEB was that traditional programming languages had been causing me to write inferior programs, although I hadn't realized what I was doing. My original idea was that WEB would be merely a tool for documentation, but I actually found that my WEB programs were better than the programs I had been writing in other languages.}}</ref> fornisce programmi di qualità superiore, poiché obbliga i programmatori a dichiarare esplicitamente i pensieri alla base del programma, rendendo più ovvie le decisioni di progettazione scarsamente ponderate. Knuth afferma anche che il literate programming fornisce un sistema di documentazione di prim'ordine, che non è un componente aggiuntivo, ma è "cresciuto" naturalmente nel processo di esposizione dei propri pensieri durante la creazione di un programma.<ref>{{Cita|Knuth}}. {{Citazione|Thus the WEB language allows a person to express programs in a ''"stream of consciousness" order''. TANGLE is able to scramble everything up into the arrangement that a PASCAL compiler demands. This feature of WEB is perhaps its greatest asset; it makes a WEB-written program much more readable than the same program written purely in PASCAL, even if the latter program is well commented. And the fact that there's no need to be hung up on the question of top-down versus bottom-up, since a programmer can now ''view a large program as a web, to be explored in a '''psychologically correct order''' is perhaps the greatest lesson'' I have learned from my recent experiences.}}</ref> La documentazione risultante consente all'autore di riavviare i propri processi di pensiero in qualsiasi momento successivo, e consente ad altri programmatori di comprendere più facilmente la costruzione del programma. Ciò differisce dalla documentazione tradizionale, in cui a un programmatore viene presentato un codice sorgente che segue un ordine imposto dal compilatore e da cui deve decifrare il processo di pensiero dietro il programma dal codice e dai commenti associati. Le capacità
Knuth afferma inoltre che il Literate Programming può portare ad un facile porting di un dato software su più ambienti, e cita persino l'implementazione di TeX come esempio.<ref>{{Cita web|url=http://archive.computerhistory.org/resources/text/Oral_History/Knuth_Don_1/Knuth_Don.oral_history.2007.102658053_all.pdf|titolo="Oral History of Donald Knuth"- an Interview with Ed Feigenbaum|sito=archive.computerhistory.org|accesso=7 dicembre 2018|lingua=en}}</ref>
| |||