1
0
Fork 0
cl-sites/guile.html_node/The-Metaobject-Protocol.html
2024-12-17 12:49:28 +01:00

96 lines
4.7 KiB
HTML

<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual documents Guile version 3.0.10.
Copyright (C) 1996-1997, 2000-2005, 2009-2023 Free Software Foundation,
Inc.
Copyright (C) 2021 Maxime Devos
Copyright (C) 2024 Tomas Volf
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License." -->
<title>The Metaobject Protocol (Guile Reference Manual)</title>
<meta name="description" content="The Metaobject Protocol (Guile Reference Manual)">
<meta name="keywords" content="The Metaobject Protocol (Guile Reference Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content=".texi2any-real">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="GOOPS.html" rel="up" title="GOOPS">
<link href="Redefining-a-Class.html" rel="next" title="Redefining a Class">
<link href="GOOPS-Object-Miscellany.html" rel="prev" title="GOOPS Object Miscellany">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
<link rel="stylesheet" type="text/css" href="https://www.gnu.org/software/gnulib/manual.css">
</head>
<body lang="en">
<div class="section-level-extent" id="The-Metaobject-Protocol">
<div class="nav-panel">
<p>
Next: <a href="Redefining-a-Class.html" accesskey="n" rel="next">Redefining a Class</a>, Previous: <a href="GOOPS-Object-Miscellany.html" accesskey="p" rel="prev">GOOPS Object Miscellany</a>, Up: <a href="GOOPS.html" accesskey="u" rel="up">GOOPS</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="The-Metaobject-Protocol-1"><span>8.11 The Metaobject Protocol<a class="copiable-link" href="#The-Metaobject-Protocol-1"> &para;</a></span></h3>
<p>At this point, we&rsquo;ve said about as much as can be said about GOOPS
without having to confront the idea of the metaobject protocol. There
are a couple more topics that could be discussed in isolation first &mdash;
class redefinition, and changing the class of existing instances &mdash; but
in practice developers using them will be advanced enough to want to
understand the metaobject protocol too, and will probably be using the
protocol to customize exactly what happens during these events.
</p>
<p>So let&rsquo;s plunge in. GOOPS is based on a &ldquo;metaobject protocol&rdquo; (aka
&ldquo;MOP&rdquo;) derived from the ones used in CLOS (the Common Lisp Object
System), tiny-clos (a small Scheme implementation of a subset of CLOS
functionality) and STKlos.
</p>
<p>The MOP underlies many possible GOOPS customizations &mdash; such as
defining an <code class="code">initialize</code> method to customize the initialization of
instances of an application-defined class &mdash; and an understanding of
the MOP makes it much easier to explain such customizations in a precise
way. And at a deeper level, understanding the MOP is a key part of
understanding GOOPS, and of taking full advantage of GOOPS&rsquo; power, by
customizing the behavior of GOOPS itself.
</p>
<ul class="mini-toc">
<li><a href="Metaobjects-and-the-Metaobject-Protocol.html" accesskey="1">Metaobjects and the Metaobject Protocol</a></li>
<li><a href="Metaclasses.html" accesskey="2">Metaclasses</a></li>
<li><a href="MOP-Specification.html" accesskey="3">MOP Specification</a></li>
<li><a href="Instance-Creation-Protocol.html" accesskey="4">Instance Creation Protocol</a></li>
<li><a href="Class-Definition-Protocol.html" accesskey="5">Class Definition Protocol</a></li>
<li><a href="Customizing-Class-Definition.html" accesskey="6">Customizing Class Definition</a></li>
<li><a href="Method-Definition.html" accesskey="7">Method Definition</a></li>
<li><a href="Method-Definition-Internals.html" accesskey="8">Method Definition Internals</a></li>
<li><a href="Generic-Function-Internals.html" accesskey="9">Generic Function Internals</a></li>
<li><a href="Generic-Function-Invocation.html">Generic Function Invocation</a></li>
</ul>
</div>
</body>
</html>