Code as data
The present disambiguation page holds the title of a primary topic, and an article needs to be written about it. It is believed to qualify as a broad-concept article. It may be written directly at this page or drafted elsewhere and then moved over here. Related titles should be described in Code as data, while unrelated titles should be moved to Code as data (disambiguation).
In computer science, the expressions code as data and data as code refer to the duality between code and data, that allows computers to treat instructions in a programming language as data handled by a running program.
Concepts where computer code is treated as data, or data executed as code, include:
- Configuration scripts, declarative programming, domain-specific languages and markup languages, where program execution is controlled by data elements that are not sequences of commands.
- First-class functions, functions that can be accessed as entities in the language.
- Homoiconicity, a property of languages like LISP where the code has the same structure as the data.
- Reflection and metaprogramming, the capability of a language to modify the structure and behavior of objects in the program at run time.
- Self-modifying code, the capability of a language to alter its own instructions while it is executing.
- Stored program, code in a computer with the Von Neumann architecture that stores programs and data in the same memory device.
| disambiguation page lists articles associated with the title Code as data.
If an internal link led you here, you may wish to change the link to point directly to the intended article.