| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html> |
| 3 |
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<title>Package System Consistency Rules (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="Package System Consistency Rules (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="Package System Consistency Rules (ANSI and GNU Common Lisp Document)"> |
| 10 |
<meta name="resource-type" content="document"> |
| 11 |
<meta name="distribution" content="global"> |
| 12 |
<meta name="Generator" content="makeinfo"> |
| 13 |
<link href="index.html" rel="start" title="Top"> |
| 14 |
<link href="Interpretation-of-Tokens.html" rel="up" title="Interpretation of Tokens"> |
| 15 |
<link href="Standard-Macro-Characters.html" rel="next" title="Standard Macro Characters"> |
| 16 |
<link href="Valid-Patterns-for-Tokens.html" rel="prev" title="Valid Patterns for Tokens"> |
| 17 |
<style type="text/css"> |
| 18 |
<!-- |
| 19 |
a.summary-letter {text-decoration: none} |
| 20 |
blockquote.indentedblock {margin-right: 0em} |
| 21 |
div.display {margin-left: 3.2em} |
| 22 |
div.example {margin-left: 3.2em} |
| 23 |
div.lisp {margin-left: 3.2em} |
| 24 |
kbd {font-style: oblique} |
| 25 |
pre.display {font-family: inherit} |
| 26 |
pre.format {font-family: inherit} |
| 27 |
pre.menu-comment {font-family: serif} |
| 28 |
pre.menu-preformatted {font-family: serif} |
| 29 |
span.nolinebreak {white-space: nowrap} |
| 30 |
span.roman {font-family: initial; font-weight: normal} |
| 31 |
span.sansserif {font-family: sans-serif; font-weight: normal} |
| 32 |
ul.no-bullet {list-style: none} |
| 33 |
--> |
| 34 |
</style> |
| 35 |
|
| 36 |
|
| 37 |
</head> |
| 38 |
|
| 39 |
<body lang="en"> |
| 40 |
<span id="Package-System-Consistency-Rules"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Previous: <a href="Valid-Patterns-for-Tokens.html" accesskey="p" rel="prev">Valid Patterns for Tokens</a>, Up: <a href="Interpretation-of-Tokens.html" accesskey="u" rel="up">Interpretation of Tokens</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="Package-System-Consistency-Rules-1"></span><h4 class="subsection">2.3.6 Package System Consistency Rules</h4> |
| 46 |
|
| 47 |
<p>The following rules apply to the package system as long as |
| 48 |
the <i>value</i> of <b>*package*</b> is not changed: |
| 49 |
</p> |
| 50 |
<dl compact="compact"> |
| 51 |
<dt><b>Read-read consistency</b></dt> |
| 52 |
<dd><p>Reading the same <i>symbol</i> <i>name</i> |
| 53 |
always results in the <i>same</i> <i>symbol</i>. |
| 54 |
</p> |
| 55 |
</dd> |
| 56 |
<dt><b>Print-read consistency</b></dt> |
| 57 |
<dd><p>An <i>interned symbol</i> always prints as a sequence of characters that, |
| 58 |
when read back in, yields the <i>same</i> <i>symbol</i>. |
| 59 |
</p> |
| 60 |
<p>For information about how the <i>Lisp printer</i> treats <i>symbols</i>, |
| 61 |
see <a href="Printing-Symbols.html">Printing Symbols</a>. |
| 62 |
</p> |
| 63 |
</dd> |
| 64 |
<dt><b>Print-print consistency</b></dt> |
| 65 |
<dd><p>If two interned <i>symbols</i> are not the <i>same</i>, |
| 66 |
then their printed representations will be different sequences of characters. |
| 67 |
</p></dd> |
| 68 |
</dl> |
| 69 |
|
| 70 |
<p>These rules are true regardless of any implicit interning. |
| 71 |
As long as the <i>current package</i> is not changed, |
| 72 |
results are reproducible regardless of the order of <i>loading</i> files |
| 73 |
or the exact history of what <i>symbols</i> were typed in when. |
| 74 |
If the <i>value</i> of <b>*package*</b> is changed and then changed back to the previous value, |
| 75 |
consistency is maintained. |
| 76 |
The rules can be violated by |
| 77 |
changing the <i>value</i> of <b>*package*</b>, |
| 78 |
forcing a change to <i>symbols</i> |
| 79 |
or to <i>packages</i> |
| 80 |
or to both |
| 81 |
by continuing from an error, |
| 82 |
or calling one of the following <i>functions</i>: |
| 83 |
<b>unintern</b>, |
| 84 |
<b>unexport</b>, |
| 85 |
<b>shadow</b>, |
| 86 |
<b>shadowing-import</b>, |
| 87 |
or <b>unuse-package</b>. |
| 88 |
</p> |
| 89 |
<p>An inconsistency only applies if one of the restrictions is violated |
| 90 |
between two of the named <i>symbols</i>. |
| 91 |
<b>shadow</b>, <b>unexport</b>, <b>unintern</b>, |
| 92 |
and <b>shadowing-import</b> can only affect the consistency of |
| 93 |
<i>symbols</i> with the same <i>names</i> (under <b>string=</b>) |
| 94 |
as the ones supplied as arguments. |
| 95 |
</p> |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
</body> |
| 101 |
</html> |