<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>冒号论坛 &#187; Topic: object范式与stream范式</title>
		<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f</link>
		<description>冒号论坛 &raquo; Topic: object范式与stream范式</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 12:51:34 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://bbs.zhenghui.org/search.php</link>
		</textInput>
		<atom:link href="http://bbs.zhenghui.org/rss/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f" rel="self" type="application/rss+xml" />

		<item>
			<title>hui on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-199</link>
			<pubDate>Mon, 27 Sep 2010 14:08:38 +0000</pubDate>
			<dc:creator>hui</dc:creator>
			<guid isPermaLink="false">199@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;不错，赫拉克利特的一个核心观点是：一切皆流（everything flows）。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>Todd on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-198</link>
			<pubDate>Mon, 27 Sep 2010 13:07:54 +0000</pubDate>
			<dc:creator>Todd</dc:creator>
			<guid isPermaLink="false">198@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;不是我联想的，Booch的《Object-Oriented Analysis and Design》上面提到了两种分解方式：对象层级和过程层级，他认为这两种方式可以追溯到上面的两位哲学家的思想。但是，我觉得赫拉克利特的思想不仅包含过程分解，更体现了流的思想，比如他的名言“没有人可以两次踏进同一条河流”。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>hui on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-197</link>
			<pubDate>Mon, 27 Sep 2010 11:21:17 +0000</pubDate>
			<dc:creator>hui</dc:creator>
			<guid isPermaLink="false">197@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;很有趣的联想，不过德谟克里特的原子论主要体现的还是还原论思想。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>Todd on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-196</link>
			<pubDate>Mon, 27 Sep 2010 11:06:54 +0000</pubDate>
			<dc:creator>Todd</dc:creator>
			<guid isPermaLink="false">196@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;最近发现，对象和流两种计算模型可以追溯到古希腊德谟克里特和赫拉克利特的哲学思想。前者提出了原子论，后者认为一切都是流。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>hui on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-165</link>
			<pubDate>Thu, 29 Jul 2010 22:32:08 +0000</pubDate>
			<dc:creator>hui</dc:creator>
			<guid isPermaLink="false">165@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;C#、ruby、python等语言确可以利用yield来产生无穷序列，术语称协程（coroutine）。在合适的场合使用这一特性可以让代码更加简明、清晰。另外，这也可看作是函数式所倡导的惰性求值（lazy evaluation）的一种特殊情形。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>Todd on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-164</link>
			<pubDate>Thu, 29 Jul 2010 21:27:44 +0000</pubDate>
			<dc:creator>Todd</dc:creator>
			<guid isPermaLink="false">164@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;今天我用C#的yield实现了一个无限流的Stack。Stack的输入是(operation, data)的流，输出是(data)流:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;class Stack{
    public static IEnumerable&#38;lt;int&#38;gt; Transform(IEnumerable&#38;lt;Command&#38;gt; aSourceStream){
        LinkedList&#38;lt;int&#38;gt; list = new LinkedList&#38;lt;int&#38;gt;();
        foreach(Command command in aSourceStream){
             if(OperationType.PUSH== command.Operation){
                  list.AddLast(command.Data);
             }
             else if (OperationType.POP == command.Operation){
                  int data = list.Last.Value;
                  list.RemoveLast();
                  yield return data;
             }
        }
    }
}&#60;/code&#62;&#60;/pre&#62;
</description>
		</item>
		<item>
			<title>Todd on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-163</link>
			<pubDate>Wed, 28 Jul 2010 19:44:02 +0000</pubDate>
			<dc:creator>Todd</dc:creator>
			<guid isPermaLink="false">163@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;虽然stream processing不一定能作为一种范式，看了SICP的介绍我觉得它还是很具有代表性的一种模型。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>hui on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-162</link>
			<pubDate>Wed, 28 Jul 2010 10:59:02 +0000</pubDate>
			<dc:creator>hui</dc:creator>
			<guid isPermaLink="false">162@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;object本身并不是编程范式，而object-oriented才是。类似地，stream本身不宜作为独立的编程范式（事实上在SCIP中，它如同object一样被当作一种data structure），相应的stream processing更适合作为一种计算模型（computational model），既可用于函数范式，也可用于并发范式。&#60;/p&#62;
&#60;p&#62;另请参见http://en.wikipedia.org/wiki/Stream_processing。
&#60;/p&#62;
</description>
		</item>
		<item>
			<title>Todd on "object范式与stream范式"</title>
			<link>http://bbs.zhenghui.org/topic/object%e8%8c%83%e5%bc%8f%e4%b8%8estream%e8%8c%83%e5%bc%8f#post-161</link>
			<pubDate>Wed, 28 Jul 2010 10:06:54 +0000</pubDate>
			<dc:creator>Todd</dc:creator>
			<guid isPermaLink="false">161@http://bbs.zhenghui.org/</guid>
			<description>&#60;p&#62;SICP的第3章比较了object与stream两种范式，但很可惜《冒号课堂》里面没有把stream列为一个独立的范式进行讨论。&#60;/p&#62;
&#60;p&#62;http://mitpress.mit.edu/sicp/full-text/sicp/book/node50.html
&#60;/p&#62;
</description>
		</item>

	</channel>
</rss>

