<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx</link><description>In order to implement the A* algorithm in C# 3.0 I am going to need to implement some custom data structures. Today we’ll consider how to implement the “path”. You’ll notice in my description of the algorithm that the only operations we perform on paths</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Techy News Blog &amp;raquo; Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5275200</link><pubDate>Thu, 04 Oct 2007 17:39:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5275200</guid><dc:creator>Techy News Blog » Path Finding Using A* in C# 3.0, Part Two</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.artofbam.com/wordpress/?p=5173"&gt;http://www.artofbam.com/wordpress/?p=5173&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5278971</link><pubDate>Fri, 05 Oct 2007 00:40:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5278971</guid><dc:creator>Phil</dc:creator><description>&lt;p&gt;Is this the same thing as consing up a list? Sounds like everything old is new again.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5279523</link><pubDate>Fri, 05 Oct 2007 01:47:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5279523</guid><dc:creator>she</dc:creator><description>&lt;p&gt;Hmm i am having a little problem trying to understand this... or rather the use case for a non-threaded standalone app for example, and why to pick this route instead over others?&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5279561</link><pubDate>Fri, 05 Oct 2007 01:54:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5279561</guid><dc:creator>Eric Lippert</dc:creator><description>&lt;p&gt;Re: threading: I do not understand the question.&lt;/p&gt;
&lt;p&gt;Re: why this route? &amp;nbsp;Because this algorithm efficiently discovers the _optimal_ path if the heuristic algorithm has certain properties. We'll get into that more later.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5279756</link><pubDate>Fri, 05 Oct 2007 02:28:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5279756</guid><dc:creator>Wesner Moise</dc:creator><description>&lt;p&gt;&amp;gt; Immutable data structures are the way of the future in C#. &lt;/p&gt;
&lt;p&gt;Music to my ears. Immutable data structures are pretty much what I use nowadays.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5279901</link><pubDate>Fri, 05 Oct 2007 02:42:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5279901</guid><dc:creator>Dean Harding</dc:creator><description>&lt;p&gt;I think she is asking &amp;quot;why would you use an immutable stack instead of a mutable one in a non-threaded application?&amp;quot;&lt;/p&gt;
&lt;p&gt;But it was already explained the reasoning for using immutable data structures in general (from the blog post):&lt;/p&gt;
&lt;p&gt;1. It is much easier to reason about a data structure if you know that it will never change.&lt;/p&gt;
&lt;p&gt;2. Since they cannot be modified, they are automatically threadsafe.&lt;/p&gt;
&lt;p&gt;3. [S]uddenly undo-redo implementations become trivial.&lt;/p&gt;
&lt;p&gt;Only #2 has anything to do with threading...&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5292554</link><pubDate>Fri, 05 Oct 2007 15:45:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5292554</guid><dc:creator>Richard</dc:creator><description>&lt;p&gt;&amp;quot;Those who do not understand lisp are doomed to reinvent it.&amp;quot; I'm glad to see C# going down this path! :)&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5292929</link><pubDate>Fri, 05 Oct 2007 16:17:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5292929</guid><dc:creator>KristofU</dc:creator><description>&lt;p&gt;At my previous job, basically all objects were immutable. &lt;/p&gt;
&lt;p&gt;Some even logically immutable, but physically mutable ( caching ! ).&lt;/p&gt;
&lt;p&gt;It's one hell of a tool for most jobs, but certainly not all.&lt;/p&gt;
&lt;p&gt;It can make some data structures very tough to deal with optimally, especially those were peformance is key, for example large matrices or vectors for data acquisition and processing. &lt;/p&gt;
&lt;p&gt;Of course you always have to use common sense, but when &amp;quot;always use immutability&amp;quot; is posed as a dogmatic rule you can run into huge problems when your app is scaling up.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5307298</link><pubDate>Sat, 06 Oct 2007 08:30:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5307298</guid><dc:creator>Tom Kirby-Green</dc:creator><description>&lt;p&gt;Looking forward to your sharing your thoughts on immutable structures. One imagines you might mention how nicely they play with ParallelFX? ;-)&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5308697</link><pubDate>Sat, 06 Oct 2007 10:04:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5308697</guid><dc:creator>foxyshadis</dc:creator><description>&lt;p&gt;Is this just going to be a keyword that can be applied to any class definition? (Or an anti-keyword if it's the new default.) Or will it be part of the declaration/instantiation? I'm suddenly very interested in where this is heading, especially if you can easily ask for old copies.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5371931</link><pubDate>Tue, 09 Oct 2007 00:22:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5371931</guid><dc:creator>damien morton</dc:creator><description>&lt;p&gt;So when will we see wholistic suport for immutable data in C# and the CLR?&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5372599</link><pubDate>Tue, 09 Oct 2007 01:16:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5372599</guid><dc:creator>Eric Lippert</dc:creator><description>&lt;p&gt;It's already possible to have fully immutable data structures in C# and the CLR enforced by the runtime and the type system. &amp;nbsp;That's what the &amp;quot;readonly&amp;quot; keyword is for.&lt;/p&gt;
&lt;p&gt;What I would like to see in hypothetical future versions of the language is more syntactic sugar to make this feature which already exists easier to use. &amp;nbsp;Doing stuff like&lt;/p&gt;
&lt;p&gt;class Foo { &lt;/p&gt;
&lt;p&gt; &amp;nbsp;private readonly int blah;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public int Blah { get { return blah; } }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public Foo(int blah) { this.blah = blah; }&lt;/p&gt;
&lt;p&gt;is a pain in the rear. &amp;nbsp;Wouldn't it be nice if you could do something like:&lt;/p&gt;
&lt;p&gt;class Foo { &lt;/p&gt;
&lt;p&gt; &amp;nbsp;public readonly int Blah { get; set; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public Foo() { }&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Foo f = new Foo() { Blah = 123 };&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5383437</link><pubDate>Tue, 09 Oct 2007 19:07:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5383437</guid><dc:creator>damien morton</dc:creator><description>&lt;p&gt;Yep - that would be nice.&lt;/p&gt;
&lt;p&gt;Also nice would be something that let you say:&lt;/p&gt;
&lt;p&gt;Foo a = new Foo() { Blah=123 };&lt;/p&gt;
&lt;p&gt;Foo b = new Foo(a) { Blah=124 };&lt;/p&gt;
&lt;p&gt;So that you can copy-and-modify in one operation.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5385494</link><pubDate>Tue, 09 Oct 2007 22:37:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5385494</guid><dc:creator>WaterBreath</dc:creator><description>&lt;p&gt;&amp;gt; Immutable data structures are the way of the future in C#.&lt;/p&gt;
&lt;p&gt;Hmmm....&lt;/p&gt;
&lt;p&gt;First there were delegates. &amp;nbsp;Then lambdas and a smattering of type inference. &amp;nbsp;And now immutable data structures as &amp;quot;the future&amp;quot;. &amp;nbsp;Sounds to me like you guys are slowly trying to turn C# into a full-fledged &amp;quot;functional language&amp;quot;.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5385547</link><pubDate>Tue, 09 Oct 2007 22:45:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5385547</guid><dc:creator>Eric Lippert</dc:creator><description>&lt;p&gt;We like functional languages. They are... functional.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5395526</link><pubDate>Thu, 11 Oct 2007 03:03:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5395526</guid><dc:creator>damien morton</dc:creator><description>&lt;p&gt;Hmm. Interesting question: do you want to declare that classes/structs are immutable, or merely that their individual properties are immutable.&lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;p&gt;class Bar&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public readonly int Blah { get; set; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public int Bleh {get; set; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;class Foo&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public readonly Bar Baz { get; set; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;var f = new Foo() { Baz = new Bar() { Blah=123, Bleh=124}};&lt;/p&gt;
&lt;p&gt;f.Baz.Bleh=145; &lt;/p&gt;
&lt;p&gt;Baz is a readonly property, and yet its value can be modified; or rather, a part of its value can be modified.&lt;/p&gt;
&lt;p&gt;I think it would be more usefull to declare classes/structs as immutable, and these classes could only contain properties whose classes were in turn immutable.&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5397392</link><pubDate>Thu, 11 Oct 2007 08:40:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5397392</guid><dc:creator>Eric Lippert</dc:creator><description>&lt;p&gt;Right, what you are describing is deep vs shallow immutability. &amp;nbsp;Both have their uses. It would be nice if there were an easier way to describe and enforce what kind of immutability you want.&lt;/p&gt;
</description></item><item><title>Community Convergence XXXIII</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#5456021</link><pubDate>Mon, 15 Oct 2007 04:17:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5456021</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the thirty-third edition of Community Convergence. This week we have a new video called Programming&lt;/p&gt;
</description></item><item><title>Immutability in C# Part One: Kinds of Immutability</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#6179516</link><pubDate>Tue, 13 Nov 2007 21:14:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6179516</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description>&lt;p&gt;I said in an earlier post that I believe that immutable objects are the way of the future in C#. I stand&lt;/p&gt;
</description></item><item><title>Immutability in C# Part One: Kinds of Immutability</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#6179907</link><pubDate>Tue, 13 Nov 2007 21:35:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6179907</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;I said in an earlier post that I believe that immutable objects are the way of the future in C#. I stand&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#6419888</link><pubDate>Tue, 20 Nov 2007 07:05:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6419888</guid><dc:creator>Songphon</dc:creator><description>&lt;p&gt;I'm concerning about two things.&lt;/p&gt;
&lt;p&gt;One is overhead of creation of immutable object.&lt;/p&gt;
&lt;p&gt;Whatif objects are created masively which that the way in real-life usage.right?&lt;/p&gt;
&lt;p&gt;The other is GC.&lt;/p&gt;
&lt;p&gt;if all things go immutable, Is GC will does the collecting up oftenly which is led to performance problem?&lt;/p&gt;
&lt;p&gt;How can we handle this issues?&lt;/p&gt;
</description></item><item><title>re: Path Finding Using A* in C# 3.0, Part Two</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#6798014</link><pubDate>Tue, 18 Dec 2007 20:26:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6798014</guid><dc:creator>Murph</dc:creator><description>&lt;p&gt;I'm glad that immutable data structures are making there way to the forefront. &amp;nbsp;In response to &amp;quot;she,&amp;quot; one of the nice uses for them that I've found that doesn't have anything to do with threading and whatnot is for specifying return types for methods and properties that have more functionality than arrays, but clearly cannot be modified. &amp;nbsp;For example, sometimes I would like to have a property whose value was similar in functionality to Dictionary&amp;lt;TKey, TVal&amp;gt; but whose contents would be generated by the getter. &amp;nbsp;With a mutable Dictionary, one might think that the value returned by the property could be modified and expect the modifications to be reflected on the object that contains the property. &amp;nbsp;However, this would not be the case and an immutable Dictionary would make it more clear that the returned value provides read-access only.&lt;/p&gt;
</description></item><item><title>Making Spec# a Priority</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#8436293</link><pubDate>Tue, 29 Apr 2008 02:21:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8436293</guid><dc:creator>Matthew Podwysocki</dc:creator><description>&lt;p&gt;During ALT.NET Open Spaces, Seattle, I spent a bit of time with Rustan Leino and Mike Barnett from the&lt;/p&gt;
</description></item><item><title>Making Spec# a Priority</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#8436297</link><pubDate>Tue, 29 Apr 2008 02:24:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8436297</guid><dc:creator>Matthew Podwysocki's Blog</dc:creator><description>&lt;p&gt;During ALT.NET Open Spaces, Seattle, I spent a bit of time with Rustan Leino and Mike Barnett from the&lt;/p&gt;
</description></item><item><title>MicroQuest – AStar Pathfinding</title><link>http://blogs.msdn.com/ericlippert/archive/2007/10/04/path-finding-using-a-in-c-3-0-part-two.aspx#8652222</link><pubDate>Wed, 25 Jun 2008 17:22:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8652222</guid><dc:creator>Marc: My Words</dc:creator><description>&lt;p&gt;The first thing I want to be able to do in MicroQuest is move my &amp;amp;quot;unit&amp;amp;quot; around the &amp;amp;quot;game&lt;/p&gt;
</description></item></channel></rss>