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

65 lines
No EOL
5.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: ParenScriptObjectSystem</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=ParenScriptObjectSystem">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - ParenScriptObjectSystem</span>
<div id="content"><div id="content-area"><div id="article-title">ParenScriptObjectSystem</div><div id="article">The ParenScript Object System (<a href="https://gitlab.common-lisp.net/suave/paren-psos">PSOS</a>) is a facility for object-oriented programming in ParenScript using the same style and techniques as the <a href="CLOS.html" class="internal">Common Lisp Object System</a>. It consists of a set of macros in lisp and a runtime environment in <a href="Parenscript.html" class="category">Parenscript</a>. The project is maintained by Red Daly (reddaly at gmail) and licensed under the <a href="GPL.html" class="category">GPL</a>.<p><h2>Features</h2><p>Multiple inheritance, generic functions, and basic method combination is currently implemented. Example Parenscript that uses PSOS:<p><div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defclass.html" class="symbol"><i><span class="symbol">defclass</span></i></a> person <span class="paren2">(<span class="nonparen"></span>)</span></span>)</span>
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defclass.html" class="symbol"><i><span class="symbol">defclass</span></i></a> politician <span class="paren2">(<span class="nonparen">person</span>)</span></span>)</span>
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defgeneric.html" class="symbol"><i><span class="symbol">defgeneric</span></i></a> discuss-environment <span class="paren2">(<span class="nonparen">individual</span>)</span></span>)</span>
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defmethod.html" class="symbol"><i><span class="symbol">defmethod</span></i></a> discuss-environment <span class="paren2">(<span class="nonparen"><span class="paren3">(<span class="nonparen">individual person</span>)</span></span>)</span>
<span class="paren2">(<span class="nonparen">alert <span class="string">"I don't know anything about the environment"</span></span>)</span></span>)</span>
<span class="paren1">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/mac_defmethod.html" class="symbol"><i><span class="symbol">defmethod</span></i></a> discuss-environment <span class="paren2">(<span class="nonparen"><span class="paren3">(<span class="nonparen">individual politician</span>)</span></span>)</span>
<span class="paren2">(<span class="nonparen">alert <span class="string">"The environment is an important issue, but so is Osama Bin Laden"</span></span>)</span></span>)</span></span></div><p><h2>TODO</h2><p><ul>
<li>method dispatch optimization
</li>
<li>slots beyond <a href="javascript.html" class="internal">javascript</a>'s built-in per-object slot storage.
</li>
<li>a well-defined <a href="MOP.html" class="internal">metaobject protocol</a>
</li>
</ul></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="ParenScriptObjectSystem.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=ParenScriptObjectSystem">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=ParenScriptObjectSystem">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=ParenScriptObjectSystem&amp;from-revision=3799552736">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>