1
0
Fork 0
cl-sites/ecl.common-lisp.dev/static/manual/Meta_002dObject-Protocol-_0028MOP_0029.html

190 lines
7.4 KiB
HTML
Raw Permalink Normal View History

2024-12-24 19:15:49 +01:00
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.0.3, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Meta-Object Protocol (MOP) (ECL Manual)</title>
<meta name="description" content="Meta-Object Protocol (MOP) (ECL Manual)">
<meta name="keywords" content="Meta-Object Protocol (MOP) (ECL Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Indexes.html" rel="index" title="Indexes">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Extensions.html" rel="up" title="Extensions">
<link href="Gray-Streams.html" rel="next" title="Gray Streams">
<link href="Memory-Management.html#Memory-Management" rel="prev" title="Memory Management">
<style type="text/css">
<!--
/* colors */
span.r {font-family: initial; font-weight: normal; font-style: normal}
@media (prefers-color-scheme: dark) {
/* dark theme */
html { color: seashell;
background: #1A1A1A; }
body { background: #1A1A1A; }
th { border-bottom: 2px solid lightgray; }
h1, h2, h3, h4, h5 { background-image: linear-gradient(to left, #202020, #3A3A3A); }
code, var, code a { color: darkorange;
background: #2A2A2A; }
a { color: seashell; }
pre { background: #2A2A2A;
color: seashell;
/* mark longer code block with stripe on the left */
border-left: 5px solid darkorange;
padding-left: 10px; }
pre.screen { background: #2A2A2A;
border: 1px solid lightgray; }
pre.programlisting { background: #2A2A2A;
border-left: 1px solid lightgray;
border-top: 1px solid lightgray; }
/* we need a light background in order for the images to be readable */
img { background: white }
}
@media (prefers-color-scheme: light) {
/* light theme */
html { background: white }
body { background: white }
th { border-bottom: 2px solid gray; }
h1, h2, h3, h4, h5 { background: lightgray; }
code, var, code a { color: darkred;
background: whitesmoke; }
a { color: #000; }
pre { background: whitesmoke;
color: black;
/* mark longer code block with stripe on the left */
border-left: 5px solid darkred;
padding-left: 10px; }
pre.screen { background: #EEE;
border: 1px solid black; }
pre.programlisting { background: #EEEEEE;
border-left: 1px solid black;
border-top: 1px solid black; }
}
body {
margin: 1em 125px 0 10%;
line-height: 1.5em;
padding: 0 2em 1em 2em;
font: 13px Verdana,Arial, sans-serif
}
ul, dd, dl, dt { margin-top: 0; margin-bottom: 0; }
p, code, td, dl, dt {
line-height: 1.5em;
}
table {
font: inherit;
border-collapse: collapse;
}
th, td {
vertical-align: top;
}
h1, h2, h3 { padding-left: 15px; }
h4, h5 { padding-left: 5px; }
code, pre {
font-size: 1em;
font-family: monospace;
}
var {
font-size: 1em;
}
/* links inside code appear the same as the code itself */
code a {
font-weight: normal;
text-decoration: none;
}
/* but get an underline when hovering */
code a:hover {
text-decoration: underline;
}
/* ordinary links appear in bold */
a { font-weight: bold; }
pre.verbatim {
margin: 0 0 0 0;
}
pre {
overflow: auto;
}
pre.screen {
font-weight: bold;
padding: 0.5em;
}
pre.programlisting {
padding: 0.5em;
}
div p { padding: 0 2em }
li p { padding: 0; margin: 0 }
hr { display: none; }
div.funcsynopsis p {
text-indent: -2em;
}
div.variablelist {
padding: 0 2em;
}
.type, .funcsynopsis, .symbol {
font-family: monospace;
}
.type, .symbol, .replaceable {
white-space: nowrap;
}
-->
</style>
</head>
<body lang="en">
<div class="section-level-extent" id="Meta_002dObject-Protocol-_0028MOP_0029">
<div class="nav-panel">
<p>
Next: <a href="Gray-Streams.html" accesskey="n" rel="next">Gray Streams</a>, Previous: <a href="Memory-Management.html#Memory-Management" accesskey="p" rel="prev">Memory Management</a>, Up: <a href="Extensions.html" accesskey="u" rel="up">Extensions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
<h3 class="section" id="Meta_002dObject-Protocol-_0028MOP_0029-1">3.7 Meta-Object Protocol (MOP)</h3>
<ul class="mini-toc">
<li><a href="Meta_002dObject-Protocol-_0028MOP_0029.html#MOP-_002d-Introduction" accesskey="1">Introduction</a></li>
</ul>
<hr>
<div class="subsection-level-extent" id="MOP-_002d-Introduction">
<div class="nav-panel">
<p>
Up: <a href="Meta_002dObject-Protocol-_0028MOP_0029.html#Meta_002dObject-Protocol-_0028MOP_0029" accesskey="u" rel="up">Meta-Object Protocol (MOP)</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
<h4 class="subsection" id="Introduction-3">3.7.1 Introduction</h4>
<p>The Meta-Object Protocol is an extension to Common Lisp which provides rules, functions and a type structure to handle the object system. It is a reflective system, where classes are also objects and can be created and manipulated using very well defined procedures.
</p>
<p>The Meta-Object Protocol associated to Common Lisp&rsquo;s object system was introduced in a famous book, The Art of the Metaobject Protocol AMOP [see <a class="pxref" href="Bibliography.html">AMOP</a>], which was probably intended for the ANSI [see <a class="pxref" href="Bibliography.html">ANSI</a>] specification but was dropped because of its revolutionary and then not too well tested ideas.
</p>
<p>The AMOP is present, in one way or another, in most Common Lisp implementations, either using proprietary systems or because their implementation of CLOS descended from PCL (Portable CommonLoops). It has thus become a de facto standard and ECL should not be without it.
</p>
<p>Unfortunately ECL&rsquo;s own implementation originally contained only a subset of the AMOP. This was a clever decision at the time, since the focus was on performance and on producing a stable and lean implementation of Common Lisp. Nowadays it is however not an option, especially given that most of the AMOP can be implemented with little cost for both the implementor and the user.
</p>
<p>So ECL has an almost complete implementation of the AMOP. However, since it was written from scratch and progressed according to user&rsquo;s request and our own innovations, there might still be some missing functionality which we expect to correct in the near future. Please report any feature you miss as a bug through the appropriate channels.
</p>
</div>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Gray-Streams.html" accesskey="n" rel="next">Gray Streams</a>, Previous: <a href="Memory-Management.html#Memory-Management" accesskey="p" rel="prev">Memory Management</a>, Up: <a href="Extensions.html" accesskey="u" rel="up">Extensions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Indexes.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>