<?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>《最为奇怪的程序语言的特性》的评论</title>
	<atom:link href="http://coolshell.cn/articles/2053.html/feed" rel="self" type="application/rss+xml" />
	<link>http://coolshell.cn/articles/2053.html</link>
	<description>享受编程和技术所带来的快乐 - http://coolshell.cn</description>
	<lastBuildDate>Mon, 21 May 2012 17:16:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>作者：codeup</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-46396</link>
		<dc:creator>codeup</dc:creator>
		<pubDate>Thu, 21 Apr 2011 13:47:30 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-46396</guid>
		<description>我测试第三个的时候出现问题了，如果不加-trigraphs参数的话，用gcc编译不会出现这种效果欧～</description>
		<content:encoded><![CDATA[<p>我测试第三个的时候出现问题了，如果不加-trigraphs参数的话，用gcc编译不会出现这种效果欧～</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：昵称</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-43525</link>
		<dc:creator>昵称</dc:creator>
		<pubDate>Sun, 10 Apr 2011 08:29:23 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-43525</guid>
		<description>看见标题第一个想到的是Scheme的call/cc</description>
		<content:encoded><![CDATA[<p>看见标题第一个想到的是Scheme的call/cc</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：几篇技术文章 &#124; YJ Made and Design</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-20746</link>
		<dc:creator>几篇技术文章 &#124; YJ Made and Design</dc:creator>
		<pubDate>Wed, 29 Dec 2010 16:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-20746</guid>
		<description>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</description>
		<content:encoded><![CDATA[<p>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：流体力学的演示 &#124; YJ Made and Design</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-20710</link>
		<dc:creator>流体力学的演示 &#124; YJ Made and Design</dc:creator>
		<pubDate>Wed, 29 Dec 2010 16:48:19 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-20710</guid>
		<description>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</description>
		<content:encoded><![CDATA[<p>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：流体力学的演示 &#124; liansi.org</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-19713</link>
		<dc:creator>流体力学的演示 &#124; liansi.org</dc:creator>
		<pubDate>Tue, 21 Dec 2010 14:20:38 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-19713</guid>
		<description>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</description>
		<content:encoded><![CDATA[<p>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：莽东</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-17746</link>
		<dc:creator>莽东</dc:creator>
		<pubDate>Fri, 10 Dec 2010 09:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-17746</guid>
		<description>我现在终于明白为什么出现Java的Integer cache 的异常情况，对于象Integer这样的对象，如果用象“&gt;=”、“&lt;=”、“==”的操作符的时候，实际上是比较的是两者句柄的地址，对于不在-128到+127之间的数，当然是由于两者不是同一个对象导致两者比较不会相同；但是对于在其范围之内的数比较的是两个数的cache的地址，由于两者序号一致所以，cache的地址自然一样所有就出现的这样的诡异的现象，如果把“==”换成“equals”方法自然就露出了狐狸尾巴啊！呵呵看来对JAVA又有了更进一步的理解！</description>
		<content:encoded><![CDATA[<p>我现在终于明白为什么出现Java的Integer cache 的异常情况，对于象Integer这样的对象，如果用象“&gt;=”、“&lt;=”、“==”的操作符的时候，实际上是比较的是两者句柄的地址，对于不在-128到+127之间的数，当然是由于两者不是同一个对象导致两者比较不会相同；但是对于在其范围之内的数比较的是两个数的cache的地址，由于两者序号一致所以，cache的地址自然一样所有就出现的这样的诡异的现象，如果把“==”换成“equals”方法自然就露出了狐狸尾巴啊！呵呵看来对JAVA又有了更进一步的理解！</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：莽东</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-17736</link>
		<dc:creator>莽东</dc:creator>
		<pubDate>Fri, 10 Dec 2010 08:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-17736</guid>
		<description>我们看一下Integer Cache代码如下：
    private static class IntegerCache {
	private IntegerCache(){}

	static final Integer cache[] = new Integer[-(-128) + 127 + 1];

	static {
	    for(int i = 0; i &lt; cache.length; i++)
		cache[i] = new Integer(i - 128);
	}
    }


这个私有类的cache字段的值实际上从-128到+127，这256个数值，结合valueOf的代码，发现如果输入了从-128到+127的数值，必然返回Integer形式的-128到+127。所以Integer诡异行为得另外分析啊</description>
		<content:encoded><![CDATA[<p>我们看一下Integer Cache代码如下：<br />
    private static class IntegerCache {<br />
	private IntegerCache(){}</p>
<p>	static final Integer cache[] = new Integer[-(-128) + 127 + 1];</p>
<p>	static {<br />
	    for(int i = 0; i &lt; cache.length; i++)<br />
		cache[i] = new Integer(i &#8211; 128);<br />
	}<br />
    }</p>
<p>这个私有类的cache字段的值实际上从-128到+127，这256个数值，结合valueOf的代码，发现如果输入了从-128到+127的数值，必然返回Integer形式的-128到+127。所以Integer诡异行为得另外分析啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：几篇技术文章 &#124; liansi.org</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-15427</link>
		<dc:creator>几篇技术文章 &#124; liansi.org</dc:creator>
		<pubDate>Thu, 25 Nov 2010 18:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-15427</guid>
		<description>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</description>
		<content:encoded><![CDATA[<p>[...] 2010年01月21日 &#8212; 最为奇怪的程序语言的特性 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：v5</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-15298</link>
		<dc:creator>v5</dc:creator>
		<pubDate>Thu, 25 Nov 2010 04:37:47 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-15298</guid>
		<description>忍不住说一下，第七个博主搞错了。
to是个串口，不应该++。
不要无人子弟啊:D
**正确代码**
send(to, from, count)
register short *to, *from;
register count;
{
	register n=(count+7)/8;
	switch(count%8){
	case 0:	do{	*to = *from++;
	case 7:		*to = *from++;
	case 6:		*to = *from++;
	case 5:		*to = *from++;
	case 4:		*to = *from++;
	case 3:		*to = *from++;
	case 2:		*to = *from++;
	case 1:		*to = *from++;
		}while(--n&gt;0);
	}
}</description>
		<content:encoded><![CDATA[<p>忍不住说一下，第七个博主搞错了。<br />
to是个串口，不应该++。<br />
不要无人子弟啊:D<br />
**正确代码**<br />
send(to, from, count)<br />
register short *to, *from;<br />
register count;<br />
{<br />
	register n=(count+7)/8;<br />
	switch(count%8){<br />
	case 0:	do{	*to = *from++;<br />
	case 7:		*to = *from++;<br />
	case 6:		*to = *from++;<br />
	case 5:		*to = *from++;<br />
	case 4:		*to = *from++;<br />
	case 3:		*to = *from++;<br />
	case 2:		*to = *from++;<br />
	case 1:		*to = *from++;<br />
		}while(&#8211;n&gt;0);<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：无缺</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-10404</link>
		<dc:creator>无缺</dc:creator>
		<pubDate>Mon, 27 Sep 2010 02:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-10404</guid>
		<description>我是PHP程序员，我觉得PHP的可变函数和可变变量的特性很好用啊，哈哈，其他语言没有吗？</description>
		<content:encoded><![CDATA[<p>我是PHP程序员，我觉得PHP的可变函数和可变变量的特性很好用啊，哈哈，其他语言没有吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：WTF Javascript &#124; 酷壳 - CoolShell.cn</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-6999</link>
		<dc:creator>WTF Javascript &#124; 酷壳 - CoolShell.cn</dc:creator>
		<pubDate>Wed, 02 Jun 2010 01:53:04 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-6999</guid>
		<description>[...] 如果不知道的话，你可以到这个网页上去讨论讨论。当然，如果你不懂也没有什么关系，因为Javascript本身就是一个很怪异的语言，再加上浏览器的种种不是，所以，Javascript程序员也是很郁闷的。在以前的“最为奇怪的程序语言的特性”中也说过一些。Javascript最怪异的特性导致了wtfjs.com这样的一个网站，还有一个WTF JS的开源站点。呵呵。 AKPC_IDS += &quot;2492,&quot;; [...]</description>
		<content:encoded><![CDATA[<p>[...] 如果不知道的话，你可以到这个网页上去讨论讨论。当然，如果你不懂也没有什么关系，因为Javascript本身就是一个很怪异的语言，再加上浏览器的种种不是，所以，Javascript程序员也是很郁闷的。在以前的“最为奇怪的程序语言的特性”中也说过一些。Javascript最怪异的特性导致了wtfjs.com这样的一个网站，还有一个WTF JS的开源站点。呵呵。 AKPC_IDS += &quot;2492,&quot;; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：zino</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-5179</link>
		<dc:creator>zino</dc:creator>
		<pubDate>Tue, 23 Feb 2010 01:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-5179</guid>
		<description>第三个例子LOLI =，= 难道是我思想不纯洁</description>
		<content:encoded><![CDATA[<p>第三个例子LOLI =，= 难道是我思想不纯洁</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：古歌</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-4778</link>
		<dc:creator>古歌</dc:creator>
		<pubDate>Thu, 28 Jan 2010 08:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-4778</guid>
		<description>&lt;a href=&quot;#comment-4174&quot; rel=&quot;nofollow&quot;&gt;@刘鑫&lt;/a&gt; 
为何自挂东南枝？西北有高楼^^</description>
		<content:encoded><![CDATA[<p><a href="#comment-4174" rel="nofollow">@刘鑫</a><br />
为何自挂东南枝？西北有高楼^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：古歌</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-4777</link>
		<dc:creator>古歌</dc:creator>
		<pubDate>Thu, 28 Jan 2010 08:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-4777</guid>
		<description>记得在哪里看过a++,a--可以随便用,++a和--a最好不要到处用，因为在不同的编译器下会有不同的结果。现在方便了，万一以后出现问题，让找bug的人难为死。。。</description>
		<content:encoded><![CDATA[<p>记得在哪里看过a++,a&#8211;可以随便用,++a和&#8211;a最好不要到处用，因为在不同的编译器下会有不同的结果。现在方便了，万一以后出现问题，让找bug的人难为死。。。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：xLight</title>
		<link>http://coolshell.cn/articles/2053.html/comment-page-1#comment-4742</link>
		<dc:creator>xLight</dc:creator>
		<pubDate>Tue, 26 Jan 2010 02:59:08 +0000</pubDate>
		<guid isPermaLink="false">http://coolshell.cn/?p=2053#comment-4742</guid>
		<description>PHP那个算是一个动态特性吧
但不能乱用，很难debug</description>
		<content:encoded><![CDATA[<p>PHP那个算是一个动态特性吧<br />
但不能乱用，很难debug</p>
]]></content:encoded>
	</item>
</channel>
</rss>

