Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
First-class citizen
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Reflection== {{main article|Reflection (computer programming)}} Some languages, such as [[Java programming language|Java]] and [[PHP]], have an explicit [[Reflection (computer programming)|reflection]] subsystem which allow access to internal implementation structures even though they are not accessible or manipulable in the same way as ordinary objects. In other languages, such as those in the [[Lisp (programming language)|Lisp]] family, reflection is a central feature of the language, rather than a special subsystem. Typically this takes the form of some set of the following features: * [[Macro (computer science)#Syntactic_macros|syntactic macros]] or [[fexpr]]s - which allow the user to write code which handles code as data and evaluates it by discretion, enabling, for example, programs to write programs (or rewrite themselves) inside of the compiler, interpreter, or even the parser ([[Lisp reader|reader macro]]s); * a [[meta-circular evaluator]] - which provides a definition of the language's [[eval|evaluator]] as a compiled tautologisation of itself, facilitating straightforward modification of the language without requiring a [[metalanguage]] different from itself; * a [[Metaobject#Metaobject_protocol|metaobject protocol]] - a special form of meta-circular evaluator for [[object-oriented programming]], in which the object system implements itself recursively via a system of metaclasses and metaobjects, which are themselves classes and objects. These allow varying forms of first-class access to the language implementation, and are, in general, manipulable in the same way as, and fully indistinguishable from, ordinary language objects. Because of this, their usage generally comes with some (cultural) stipulations and advice, as untested modification of the core programming system by users can easily undermine performance optimisations made by language implementers.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)