<?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>Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx</link><description>When we talk about Axum as a programming language, we make the point that it is not an object-oriented language, but that it is still object-aware. What do we mean by this, and is it really true that you cannot define objects with Axum? What we mean is</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Name</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9600536</link><pubDate>Sun, 10 May 2009 16:25:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9600536</guid><dc:creator>Alexey Romanov</dc:creator><description>&lt;p&gt;What about &amp;quot;datatype&amp;quot; or simply &amp;quot;data&amp;quot; (as replacement for &amp;quot;schema&amp;quot;)?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9600536" width="1" height="1"&gt;</description></item><item><title>Design Patterns as External DSLs</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9592330</link><pubDate>Thu, 07 May 2009 02:13:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9592330</guid><dc:creator>justnbusiness</dc:creator><description>&lt;p&gt;Design Patterns as External DSLs&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9592330" width="1" height="1"&gt;</description></item><item><title>More on Immutability</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9591928</link><pubDate>Wed, 06 May 2009 22:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9591928</guid><dc:creator>Isolation, Agents, and Message-passing in .NET</dc:creator><description>&lt;p&gt;The subject of immutability sparks intense interest among the people who follow our blog, as is evident&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9591928" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9572110</link><pubDate>Tue, 28 Apr 2009 00:55:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9572110</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Making schemata immutable and generating Equals() and GetHashCode() at compile-time both strike me as desirable features for a purpose built language like Axum. I am more than willing to deal with the inconveniences of immutability for the guarantees that come with it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9572110" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9568962</link><pubDate>Sun, 26 Apr 2009 10:29:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9568962</guid><dc:creator>Gerke Geurts</dc:creator><description>&lt;p&gt;Regarding name choice: I've used the term 'Spec' (short for Specification) so far when writing (meta)types that define structure and rules to be implemented by/adhered to by other types.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9568962" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9567275</link><pubDate>Fri, 24 Apr 2009 23:27:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9567275</guid><dc:creator>Shawn B.</dc:creator><description>&lt;p&gt;Niklas,&lt;/p&gt;
&lt;p&gt;Our scenarios differ. &amp;nbsp;I see exactly what you are getting at.&lt;/p&gt;
&lt;p&gt;We will pass our object into some type of RPC via load balancer (hence our stateless nature) and if we require a mutated object, it comes back as a result and so will be a seperate assignment on a clone anyway. &amp;nbsp;But that &amp;quot;clone&amp;quot; should still be read-only. &amp;nbsp;The original at this point is &amp;quot;forgotten&amp;quot;.&lt;/p&gt;
&lt;p&gt;All other times the call is one-way and we'll never need the object again from the sending side.&lt;/p&gt;
&lt;p&gt;Both scenarios are equally as common for us.&lt;/p&gt;
&lt;p&gt;The second is the one I had in mind during my lengthy discussions. &amp;nbsp;It forms our backend (where I spend my career) or various integration services and object ownership transfer, as you put it, is the norm.&lt;/p&gt;
&lt;p&gt;The customer facing projects however, use the first scenario.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9567275" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9567263</link><pubDate>Fri, 24 Apr 2009 23:17:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9567263</guid><dc:creator>Shawn B.</dc:creator><description>&lt;p&gt;I can live with immutability being enforced at the point where the message is transported. &amp;nbsp;On the receiving side, I receive a clone anyway. &amp;nbsp;However, we still modify the payload after reception. &amp;nbsp;At that point, you're saying it is read-only.&lt;/p&gt;
&lt;p&gt;I can live with that, though not ideal, if I can very easily create a new &amp;quot;unlocked&amp;quot; clone based on it (ideally the message will give me an unlocked clone without using reflection internally). &amp;nbsp;Then I can continue to modify the new object as I see fit until it becomes a message again. &amp;nbsp;This scenario isn't ideal, but it is better than a pure read-only after contructor approach.&lt;/p&gt;
&lt;p&gt;Performance won't suffer terribly. &amp;nbsp;And everyone gets what they want :) &amp;nbsp; &amp;nbsp;Though preferably, I'd like to be able to unlock the locked or specify it not be locked at all. &amp;nbsp;But from your comments, it will be locked and I can live with that as long as I can get an unlocked clone without having to build it myself or use reflection (which is too darn slow for our environment) given our volume of workload.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9567263" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9567260</link><pubDate>Fri, 24 Apr 2009 23:10:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9567260</guid><dc:creator>Niklas Gustafsson</dc:creator><description>&lt;p&gt;Let me ask another question:&lt;/p&gt;
&lt;p&gt;What if schema instances were mutable, but were &amp;quot;true&amp;quot; transfer objects in the sense that once you sent an instance, it would no longer be accessible within the domain of the sender?&lt;/p&gt;
&lt;p&gt;Object ownership transfer, in other words...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9567260" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9567256</link><pubDate>Fri, 24 Apr 2009 23:07:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9567256</guid><dc:creator>Niklas Gustafsson</dc:creator><description>&lt;p&gt;Regarding tobi's comment:&lt;/p&gt;
&lt;p&gt;While it's true that we don't need schema instances to be immutable since they are always cloned, one of the reasons for making them immutable is so we don't have to always clone them.&lt;/p&gt;
&lt;p&gt;Immutability doesn't have to be &amp;quot;hard core&amp;quot; in the sense of no changes after the constructor is called, it can also be that it is mutable until the point when it is sent via a channel port, at which time all instances in the object graph are locked (this will have minimal impact on the implementation of property setters).&lt;/p&gt;
&lt;p&gt;Coercing the schema instances to a C# object on the receiving side (compiler-generated code, but not as fast as Clone) means pay-for-play: copying happens only when you really need it.&lt;/p&gt;
&lt;p&gt;So, I really don't know what the right trade-offs are here. If immutability is optional, then it is a question of where to enforce that immutability -- is it on the type? The need (or lack of need) to mutate is usually not a type-specific property, it's a component property.&lt;/p&gt;
&lt;p&gt;If coercion can be made as fast as Clone, the only downside to immutable schemas is the need to write each payload type that needs mutation twice (once as a schema, once as a C# class). It keeps the type system clean with Helland's inside / outside distinction being clear in the code.&lt;/p&gt;
&lt;p&gt;However, I don't know how to do fast coercion without modifying C#, so it's a moot point.&lt;/p&gt;
&lt;p&gt;Again, this discussion has been really insightful and very, very, useful to what we are trying to accomplish.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9567256" width="1" height="1"&gt;</description></item><item><title>re: Objects in Axum</title><link>http://blogs.msdn.com/b/maestroteam/archive/2009/04/20/objects-in-axum.aspx#9567227</link><pubDate>Fri, 24 Apr 2009 22:48:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9567227</guid><dc:creator>Niklas Gustafsson</dc:creator><description>&lt;p&gt;To answer the last question -- they are currently intended as just message payload. One of the reasons for asking about immutability is whether that perspective should change.&lt;/p&gt;
&lt;p&gt;Currently, the instances are messages only while they are in their serialized state, logically of physically, and regular instances in between. The rules are enforced when that boundary is crossed.&lt;/p&gt;
&lt;p&gt;Regarding another question asked here -- Axum is definitely meant to be used with existing code. However, it is also meant to rein in shared state anarchy, which means that not all existing code will benefit from it. Since its purpose is to impose a certain pattern (isolated islands of single-threaded execution) on the code, applications that can't be tamed obviously won't benefit.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9567227" width="1" height="1"&gt;</description></item></channel></rss>