Jump to content

Code as data

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Diego Moya (talk | contribs) at 16:51, 5 March 2019 (Expand on the broad concept, with reference defining the term). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer science, the expressions code as data and data as code refer to the duality between code and data,[1] that allows computers to treat instructions in a programming language as data handled by a running program. This concept underlies the notion of general purpose computers, as it allows a computer to run any sequence of commands that can be represented in its memory, as opposed to computers where the program is hardwired.

Concepts where computer code is treated as data, or data executed as code, include:

  1. ^ Barak, Boaz. Introduction to Theoretical Computer Science: Code as Data, Data as Code.