Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Natural Language Programming vs. Literate Programming

I can't see a difference between natural language programming and literate programming. If anyone explains, I would be grateful.

like image 444
Ersin 101 Avatar asked Sep 12 '13 14:09

Ersin 101


People also ask

What is the difference between programming and natural language?

Differences between natural language and programming language. Natural languages are spoken by people, while programming languages are intended for machines. Both languages contain important similarities, such as the differentiation they make between syntax and semantics and the existence of a basic composition.

What do we mean by literate programming?

Literate programming is a methodology that combines a programming language with a documentation language, thereby making programs more robust, more portable, more easily maintained, and arguably more fun to write than programs that are written only in a high-level language.

Is Jupyter literate programming?

A form of literate programming, a Jupyter Notebook allows for the possibility of not only writing code but also inspecting and documenting its results as a piece of writing that is understandable for human beings.


1 Answers

Natural language programming is a system for expressing instructions to a computer in a form approximating a language humans write or speak. NLP syntax structure usually resembles human-language sentence structure, in a form that might sound stilted to a native speaker, but which tends to read almost like the real language. Many NLP implementations are focused on querying data stores rather than writing programs, but actual programming implementations also exist.

Literate programming is a system for simultaneously writing programs and writing about programs. Unlike NLP, the code portions of a literate program are written in traditional programming languages. The classic examples, for which the name was coined, are Donald Knuth's writings on the TeX typesetting system. Published as his Computers and Typesetting series, the printed books are the result of processing his TeX literate program with a tool that extracts and formats only the descriptive portions. Similarly, the compilable source code is the result of processing the same literate program with a tool that extracts and reorganizes the code portions.

like image 186
Ross Patterson Avatar answered Sep 27 '22 01:09

Ross Patterson