<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Shadowing a CL function definition</title>
	<atom:link href="http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/</link>
	<description>Leslie P. Polzer on code, music, literature, design and free software business.</description>
	<lastBuildDate>Fri, 09 Dec 2011 14:52:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Pascal Bourguignon</title>
		<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/comment-page-1/#comment-4511</link>
		<dc:creator>Pascal Bourguignon</dc:creator>
		<pubDate>Tue, 01 Jul 2008 18:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/?p=80#comment-4511</guid>
		<description>Indeed, there is nothing easier in Common Lisp than shadowing, be it a function or anything else named by a symbol (since CL:SHADOW applies to symbols).

 (defpackage &quot;TEST-APPOINTMENT&quot;
    (:use &quot;CL&quot;)
    (:shadow &quot;GET-UNIVERSAL-TIME&quot;))
 (in-package TEST-APPOINTMENT&quot;)
 (defun get-universal-time () (random 1e12))
 (load &quot;appointment.lisp&quot;)</description>
		<content:encoded><![CDATA[<p>Indeed, there is nothing easier in Common Lisp than shadowing, be it a function or anything else named by a symbol (since CL:SHADOW applies to symbols).</p>
<p> (defpackage &#8220;TEST-APPOINTMENT&#8221;<br />
    (:use &#8220;CL&#8221;)<br />
    (:shadow &#8220;GET-UNIVERSAL-TIME&#8221;))<br />
 (in-package TEST-APPOINTMENT&#8221;)<br />
 (defun get-universal-time () (random 1e12))<br />
 (load &#8220;appointment.lisp&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomas Zellerin</title>
		<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/comment-page-1/#comment-4505</link>
		<dc:creator>Tomas Zellerin</dc:creator>
		<pubDate>Tue, 01 Jul 2008 14:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/?p=80#comment-4505</guid>
		<description>Why you do not use shadow for shadowing - function with same name in used package, calls COMMON-LISP counterpart, or - when testing - something other?</description>
		<content:encoded><![CDATA[<p>Why you do not use shadow for shadowing &#8211; function with same name in used package, calls COMMON-LISP counterpart, or &#8211; when testing &#8211; something other?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Kreuter</title>
		<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/comment-page-1/#comment-4504</link>
		<dc:creator>Richard Kreuter</dc:creator>
		<pubDate>Tue, 01 Jul 2008 14:12:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/?p=80#comment-4504</guid>
		<description>Strictly speaking, when the standard says that the consequences of an action are undefined, the implementation is permitted to do anything at all when a program tries it: silently ignore the attempt, ring the system bell, crash, blow up the universe, etc.; nor does the implementation have to do the same things for each attempt, or document what it&#039;s to do, etc.  So a conforming program can&#039;t programmatically detect the consequences of actions whose consequences the standard and the implementation don&#039;t define.</description>
		<content:encoded><![CDATA[<p>Strictly speaking, when the standard says that the consequences of an action are undefined, the implementation is permitted to do anything at all when a program tries it: silently ignore the attempt, ring the system bell, crash, blow up the universe, etc.; nor does the implementation have to do the same things for each attempt, or document what it&#8217;s to do, etc.  So a conforming program can&#8217;t programmatically detect the consequences of actions whose consequences the standard and the implementation don&#8217;t define.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leslie</title>
		<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/comment-page-1/#comment-4503</link>
		<dc:creator>Leslie</dc:creator>
		<pubDate>Tue, 01 Jul 2008 13:15:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/?p=80#comment-4503</guid>
		<description>That&#039;s good to know, thanks.

So reliance on this specific behaviour -- if used at all -- should be preceded by a check for it.</description>
		<content:encoded><![CDATA[<p>That&#8217;s good to know, thanks.</p>
<p>So reliance on this specific behaviour &#8212; if used at all &#8212; should be preceded by a check for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: foo</title>
		<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/comment-page-1/#comment-4502</link>
		<dc:creator>foo</dc:creator>
		<pubDate>Tue, 01 Jul 2008 13:13:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/?p=80#comment-4502</guid>
		<description>Well, ANSI Common Lisp does NOT allow to do that: changing definitions of the CL package. Many implementations will throw an error, because the package &quot;CL&quot; is locked.

Plus in compiled code the Common Lisp function might be inlined, so a redefinition would not have an effect. The Common Lisp file compiler can for example assume that within a file the definitions don&#039;t change. It can also assume that the functions of the Common Lisp package don&#039;t change.

So, what you describe may work in some implementation and may be useful there, in general it is not portable Common Lisp.</description>
		<content:encoded><![CDATA[<p>Well, ANSI Common Lisp does NOT allow to do that: changing definitions of the CL package. Many implementations will throw an error, because the package &#8220;CL&#8221; is locked.</p>
<p>Plus in compiled code the Common Lisp function might be inlined, so a redefinition would not have an effect. The Common Lisp file compiler can for example assume that within a file the definitions don&#8217;t change. It can also assume that the functions of the Common Lisp package don&#8217;t change.</p>
<p>So, what you describe may work in some implementation and may be useful there, in general it is not portable Common Lisp.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach Beane</title>
		<link>http://blog.viridian-project.de/2008/07/01/shadowing-a-cl-function-definition/comment-page-1/#comment-4501</link>
		<dc:creator>Zach Beane</dc:creator>
		<pubDate>Tue, 01 Jul 2008 13:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.viridian-project.de/?p=80#comment-4501</guid>
		<description>This is undefined behavior per 11.1.2.1.2.</description>
		<content:encoded><![CDATA[<p>This is undefined behavior per 11.1.2.1.2.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

