emacs.d/clones/lisp/www.cliki.net/Issue READER-MACRO-VALUES.html
2022-10-07 15:47:14 +02:00

88 lines
No EOL
4.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: Issue READER-MACRO-VALUES</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=Issue%20READER-MACRO-VALUES">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - Issue READER-MACRO-VALUES</span>
<div id="content"><div id="content-area"><div id="article-title">Issue READER-MACRO-VALUES</div><div id="article"><a href="Issue.html" class="category">Issue</a>: READER-MACRO-VALUES<p>Forum: Editorial<p>References: <a href="http://clhs.lisp.se/Body/02_b.htm">CLHS 2.2</a><p>Category: CLARIFICATION/CHANGE<p>Edit history: 2004-06-10, Version 1 by Lars Brinkhoff<p>Status: For CLiki consideration<p><dl>
<dt>Problem Description:
</dt>
<dd>2.2 step 4, says "The reader macro function may return zero values or one value". Is this a strict constraint on the number of values, or does the usual "primary value" rule apply?<p></dd>
<dt>Proposal (READER-MACRO-VALUES:STRICT):
</dt>
<dd>Specify that the number of values returned must be 0 or 1.<p></dd>
<dt>Proposal (READER-MACRO-VALUES:LOOSE):
</dt>
<dd>Specify that any number of values may be returned; excess values are ignored.<p></dd>
<dt>Test case:<p><dt>Rationale:
</dt>
</dt>
<dd>Mostly this precludes implementations from arbitraily adopting one of the two possible interpretations.<p></dd>
<dt>Current practice:
</dt>
<dd>
<a href="CLISP.html" class="internal">CLISP</a> implements STRICT: it throws an error if a reader macro returns more than one value.<p></dd>
<dt>Cost to Implementors:
</dt>
<dd>Small.<p></dd>
<dt>Cost to Users:
</dt>
<dd>None. Portable programs cannot currently rely on any particular behavior.<p></dd>
<dt>Cost of Non-Adoption:
</dt>
<dd>Users would be confused about what to expect because implementations might implement either of the two behaviours.<p></dd>
<dt>Benefits:
</dt>
<dd>Tighter spec.<p></dd>
<dt>Aesthetics:<p><dt>Discussion:
<ul>
<li>Bruno Haible votes for STRICT. Rationale: The number of return values of a reader macro is part of a protocol. This protocol does not currently support more than one value (but it may in the future, as an extension). Therefore STRICT increases program robustness and keeps the door open for future evolution of the protocol.
</li>
</ul>
</dt>
</dt>
</dl></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="Issue&#32;READER-MACRO-VALUES.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=Issue%20READER-MACRO-VALUES">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=Issue%20READER-MACRO-VALUES">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=Issue%20READER-MACRO-VALUES&amp;from-revision=3825275856">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>