Homoiconicity Homework.doc - In computer programming,...

This preview shows page 1 - 2 out of 3 pages.

In computer programming, homoiconicity (from the Greek words homo- meaning "the same" and icon meaning "representation") is a property of some programming languages. A language is homoiconic if a program written in it can be manipulated as data using the language, and thus the program's internal representation can be inferred just by reading the program itself. For example, a Lisp program is written as a regular Lisp list, and can be manipulated by other Lisp code. In homoiconic languages, all code can be accessed and transformed as data, using the same representation. This property is often summarized by saying that the language treats "code as data".In a homoiconic language, the primary representation of programs is also a data structure in a primitive type of the language itself. This makes metaprogrammingeasier than in a language without this property: reflection in the language (examining the program's entities at runtime) depends on a single, homogeneous structure, and it does not have to handle several different structures that would appear in a complex syntax.As noted above, a commonly cited example is the programming language Lisp, whichwas created to be easy for lists manipulation and where the structure is given by S-expressions that take the form of nested lists. Lisp programs are written in the form of lists; the result is that the program can access its own functions and procedures while running, and programmatically alter itself on thefly. Homoiconic languages typically include full support of syntactic macros, allowing the programmer to express transformations of programs in a concise way.Examples are the programming languages Clojure (a contemporary dialect of Lisp),Rebol (also its successor Red), Refal, and more recently Julia.== History ==The original source is the paper Macro Instruction Extensions of Compiler Languages, according to the early and influential paper TRAC, A Text-Handling Language:One of the main design goals was that the input script of TRAC (what is typed inby the user) should be identical to the text which guides the internal action of

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
pesch

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture