<?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>In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx</link><description>It has been a while since I have posted. We have been working hard to get Orcas beta 1 and beta 2 done. So I apologize for the long interlude between posts but I hope that you are enjoying beta 1 and that you are looking forward to beta 2. Now that beta</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823042</link><pubDate>Wed, 23 May 2007 23:47:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823042</guid><dc:creator>Luke</dc:creator><description>&lt;p&gt;Do you allow out parameters?&lt;/p&gt;
&lt;p&gt;Your specific example looks like Aspect Oriented Programming, except in a very limited fashion -- might the C# team be moving in this direction?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823043</link><pubDate>Wed, 23 May 2007 23:47:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823043</guid><dc:creator>Aaron</dc:creator><description>&lt;p&gt;This sounds oddly like a c/c++ header file. with out the link errors.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823062</link><pubDate>Wed, 23 May 2007 23:48:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823062</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;Cool!&lt;/p&gt;
&lt;p&gt;My reactionary reaction - &amp;quot;partial method&amp;quot; is a confusing name for this feature. If I've understood, there's always exactly one prototype and exactly zero or one definition bodies for this kind of method. That relationship is not one of &amp;quot;partialness&amp;quot; - partialness is a relationship allowing for *multiple* additiveness.&lt;/p&gt;
&lt;p&gt;If I were explaining what this feature was, I'd call them &amp;quot;optional&amp;quot; methods. How come you didn't go for that?&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823147</link><pubDate>Wed, 23 May 2007 23:53:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823147</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Luke:&lt;/p&gt;
&lt;p&gt;No, no out parameters but ref parameters can do much of the same thing. &amp;nbsp;AOP has been and is still on the design team's radar.&lt;/p&gt;
&lt;p&gt;Aaron:&lt;/p&gt;
&lt;p&gt;Indeed. &amp;nbsp;Except for the part of removing the calls and the evaluation of the arguments.&lt;/p&gt;
&lt;p&gt;Pete:&lt;/p&gt;
&lt;p&gt;I can definitely see what you are driving at and you make a very good case for &amp;quot;optional&amp;quot; methods. &amp;nbsp;The reason that they are partial is because they are usually used to &amp;quot;implement&amp;quot; methods in a partial class that are defined in a different class declaration. &amp;nbsp;So the name emphasizes the relationship to partial classes. &amp;nbsp;Originally we were calling them latent and actual methods and incidentally I still think of them that way.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823221</link><pubDate>Wed, 23 May 2007 23:58:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823221</guid><dc:creator>Derek</dc:creator><description>&lt;p&gt;Partial methods are somewhat interesting ... I could see them being used for a logging framework that doesn't require runtime configuration flexibility (in a performance sensitive area of code, for example).&lt;/p&gt;
&lt;p&gt;Because the log message construction is often expensive, this avoids the message construction overhead in cases where the given debug level is disabled without resorting to precompiler ugliness. In most cases I think the runtime flexibility would be more valuable, but it doesn't hurt to have this option.&lt;/p&gt;
&lt;p&gt;It would also be a nice alternative to precompilation statements in platform specific areas of code ... e.g. use a 32-bit native math library when compiling for 32-bit platforms, but fall back to a slower managed implementation that works on all platforms. This would allow you to branch the compilation in a build script, which seems cleaner.&lt;/p&gt;
&lt;p&gt;Beta 1 is nice, by the way, I especially appreciate the lightweight framework-only installation. I had been using the May CTP until beta 1 came along.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823270</link><pubDate>Thu, 24 May 2007 00:01:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823270</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Looks like you see exactly how they might be useful. &amp;nbsp;I'm glad you are enjoying beta 1.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823472</link><pubDate>Thu, 24 May 2007 00:12:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823472</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;re. latent / actual keywords&lt;/p&gt;
&lt;p&gt;Yes, this is much more intuitive (if cumbserome), I realise that I did have the right understanding of what this feature really is. &lt;/p&gt;
&lt;p&gt;There is a relationship between the prototype part and the (optional) body part, but this is completely different to the one that exists between one partial class definition and another.&lt;/p&gt;
&lt;p&gt;My first thought reading the title of your post was &amp;quot;how do you decide which part of the method gets to run first!&amp;quot; - and I think that's the initial understanding you'll get from most developers if call this feature &amp;quot;partial methods&amp;quot;. I do think this confuses a cool and otherwise easy-to-understand feature.&lt;/p&gt;
&lt;p&gt;Clearly we'd like to use the same keyword at the prototype and the body to simplify things, but the problem is that using one adjective implies that the two things are the same sort thing when they're not...&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823542</link><pubDate>Thu, 24 May 2007 00:15:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823542</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Very good point. &amp;nbsp;I will bring it up immediately.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2823786</link><pubDate>Thu, 24 May 2007 00:30:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2823786</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;... interstingly, &amp;quot;optional&amp;quot; doesn't suffer from this problem, as it doesn't imply parity between the prototype and the body - you get the best of all worlds, the same keyword on both bits, which conveys the relationship between the two, and no confusion from overloading or messing up the existing &amp;quot;partial&amp;quot; keyword's sense - as well as an intuitive keyword describing what the language feature does....&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2824585</link><pubDate>Thu, 24 May 2007 01:07:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2824585</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;...but then again, while &amp;quot;optional&amp;quot; is good for the prototype part, it is terrible from a usability point of view for the mainline scenario.&lt;/p&gt;
&lt;p&gt;partial class Customer&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;// in what sense is this optional?&lt;/p&gt;
&lt;p&gt; &amp;nbsp;optional void OnUpdateName()&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;DoSomething();&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Ideally, we'd just like to be able to write the method normally. Intellisense could prompt us that it is there to be written (as when typing &amp;quot;override &amp;quot;). Is there any deep reason why we need a special keyword at all on the implementation body?&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2827142</link><pubDate>Thu, 24 May 2007 03:36:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2827142</guid><dc:creator>David Douglass</dc:creator><description>&lt;p&gt;From what I've seen, this is a compile time feature. &amp;nbsp;It would be helpful if I could deliver a class library assembly to somebody which they could then customize by writing bodies to partial methods. &amp;nbsp;Is that possible?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2828381</link><pubDate>Thu, 24 May 2007 04:40:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2828381</guid><dc:creator>Anton Backer</dc:creator><description>&lt;p&gt;Why limit the partial method to one implementation? In the publisher/subscriber model of events, the order in which the handlers execute is explicitly unspecified (afaik) and I think it's fairly intuitive to apply that model here, especially given the already established meaning of the &amp;quot;partial&amp;quot; modifier. Multiple implementations, unspecified execution order. The only reason against this that I can think of is the loss of clarity, but I think clarity was already lost back when partial classes were introduced.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2835813</link><pubDate>Thu, 24 May 2007 10:50:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2835813</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;While I realize that this is a useful features in certain scenarios, I'm really unhappy that you implement this.&lt;/p&gt;
&lt;p&gt;So far, I've always had the impression that the designers of C# have been very careful about introducing new features. Like, there have been some arguments about whether the query projections are too specialized for a general purpose language, but then others wanted XML literals too and I've been quite comfortable with the decisions you've made there, and the reasons you offered.&lt;/p&gt;
&lt;p&gt;But now you implement a new language feature for a designer some other team is building, and this bothers me. &lt;/p&gt;
&lt;p&gt;First, because I'm not a big fan of designers. I'm quite worried they'll soon enough be sending us down the same road that COM-based development went in its last years, with hundreds of designers and wizards that generated ATL and MCF code nobody ever wanted to read. The Ruby crowd will be laughing their asses off with a few lines of source where we'll be stuck with designers and generated files and complicated build processes. (Compare that to COM/C++ vs. Java in the late 90s!) Wasn't C# about code-based developer productivity in the first place (vs. VB's designer-driven RAD road map)? You should be the last to care about the whims of the designer-based, enterprise-library-minded, software-factory-code-generator-happy folk. Resist!&lt;/p&gt;
&lt;p&gt;The second reason I'm unhappy is that there are more important features missing from C#. A lot of advanced C# developers want to walk down more dynamic paths without throwing the baby out with the bathwater and surrendering completely to dynlangs. There is still no generic ldtoken-like command for anything but types (typeof); attributes are still very limited (lambdas, generics, composition, order); AOP and DBC (Spec#) are far from easy to implement with C#... So while partial methods are not useless, they seem like the first sign of weak prioritization to me. Please don't make this a habit!&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2837990</link><pubDate>Thu, 24 May 2007 12:48:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2837990</guid><dc:creator>Tom Kirby-Green</dc:creator><description>&lt;p&gt;Awesome to have you back in the blog sphere Wez. Partial methods look so cool. I was wondering when you folks are planning on updating the C# 3 language spec doc?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2838201</link><pubDate>Thu, 24 May 2007 12:56:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2838201</guid><dc:creator>Tom Kirby-Green</dc:creator><description>&lt;p&gt;Actually to return to something you spoke about before. With C# 3 what percentage of your &amp;quot;language complexity&amp;quot; budget do feel you have left? Personally I'd like to see language bindings for concurrency over things like AOP. I really do feel strongly that C# should not descend into the murky waters of corner cases and language laywers that is commonly found in the C++ domain. Or is Ander's way ahead of us again (probably) and already working C#'s replacement :-)&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2843952</link><pubDate>Thu, 24 May 2007 18:28:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2843952</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;Yep, I've mulled it over and I would find the following syntax a lot more helpful. Any reason why it couldn't work Wes? (Do we really need a special keyword on the implementation part?)&lt;/p&gt;
&lt;p&gt;class C&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;optional void DoIt(int i);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// ...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;void DoIt(int i) &amp;nbsp;// optional implementation&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;This would make the feature clear to those who need to understand it, and transparent to those who just need to use it (writing the implementation).&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2844309</link><pubDate>Thu, 24 May 2007 18:48:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2844309</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;The only prob I can see is that you might argue that it's not obvious that you *can* write implementation.... that you need a keyword as in the case of &amp;quot;override&amp;quot;. I don't think this is how many (most) day-to-day developers work tho. Most don't think about how their event handler is being hooked up (whether it's auto-wired or overriding a virtual) - they just write the method.&lt;/p&gt;
&lt;p&gt;This could be solved by appropriate tooling - intellisense could show un-implemented optional methods in grey instead of black or something.&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2846657</link><pubDate>Thu, 24 May 2007 20:44:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2846657</guid><dc:creator>madstorgersen</dc:creator><description>&lt;p&gt;Lots of questions on why the implementation also needs the keyword: this is to catch errors. If you make a small mistake which changes the signature of the implementation you want the compiler to tell you that. If you didn't have the keyword, then having an unimplemented partial method and a slightly different normal method would be perfectly legal, and you wouldn't catch it.&lt;/p&gt;
&lt;p&gt;Mads Torgersen, C# language PM, Microsoft&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2847004</link><pubDate>Thu, 24 May 2007 21:01:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2847004</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;David:&lt;/p&gt;
&lt;p&gt;Good question. &amp;nbsp;No it is not possible to provide partial method bodies that way because it is only a compile time feature.&lt;/p&gt;
&lt;p&gt;Anton:&lt;/p&gt;
&lt;p&gt;Interesting idea. &amp;nbsp;What order would the subscribers be called in?&lt;/p&gt;
&lt;p&gt;Stefan:&lt;/p&gt;
&lt;p&gt;YOu have some very good points. &amp;nbsp;I still don't think that C# adds features at a whim. &amp;nbsp;The feature is quite useful for code generation frameworks in general.&lt;/p&gt;
&lt;p&gt;As for the features that you want to have addressed, they are being talked about for Orcas+1. &amp;nbsp;Having done the implementation for partial methods and having looked at implementing some of the other features that you mention, just remember that there is *at least* an order of magnitude difference in the cost to implement those features.&lt;/p&gt;
&lt;p&gt;Tom:&lt;/p&gt;
&lt;p&gt;The spec isn't updated? &amp;nbsp;Which one are you referring to? &amp;nbsp;Could you give me a link?&lt;/p&gt;
&lt;p&gt;Honestly, there is not a lot left of the complexity budget in my opinion. &amp;nbsp;I think new features have to dovetail very nicely within the existing mental framework or they will be too much.&lt;/p&gt;
&lt;p&gt;Pete:&lt;/p&gt;
&lt;p&gt;I really like the idea of graying out call sites for unimplemented partial methods.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2847864</link><pubDate>Thu, 24 May 2007 21:40:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2847864</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;Mads,&lt;/p&gt;
&lt;p&gt;Thanks, of course - I knew there had to be a reason - I was stuck on thinking about versioning issues (e.g. what if you add a partial prototype with the same signature as an existing normal method) - which seem to not be a problem. Didn't think about the obvious.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Pete.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2848565</link><pubDate>Thu, 24 May 2007 22:27:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2848565</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;class C&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; optional void DoIt(int i);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; // ...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; void DoIt(int i) : optional void DoIt(int i)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2852328</link><pubDate>Fri, 25 May 2007 01:33:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2852328</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Pete:&lt;/p&gt;
&lt;p&gt;Do you really want to repeat the method signature?&lt;/p&gt;
&lt;p&gt;optional void DoIt&amp;lt;T,U&amp;gt;(Dictionary&amp;lt;T,List&amp;lt;Pair&amp;lt;T,bool&amp;gt;&amp;gt;&amp;gt; d, Set&amp;lt;Tuple&amp;lt;double, bool&amp;gt;&amp;gt; s);&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2856382</link><pubDate>Fri, 25 May 2007 04:36:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2856382</guid><dc:creator>Daniel Plaisted</dc:creator><description>&lt;p&gt;No one has answered the question about what attributes are emitted when theydiffer between the definition and implementation. &amp;nbsp;My first instinct is that it is a trick question. &amp;nbsp;It seems like this should cause a compile error.&lt;/p&gt;
&lt;p&gt;Maybe there are cases where you need to apply an attribute to a partial method but the code generator won't do it for you when writing the defining declaration. &amp;nbsp;If that is the case, maybe the compiler combines the attributes from both declarations, or just doesn't allow attributes on the defining declaration.&lt;/p&gt;
&lt;p&gt;There are probably other ways of handling it, but I think they would be even more complicated and more likely to confuse people.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2863762</link><pubDate>Fri, 25 May 2007 10:38:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2863762</guid><dc:creator>Pete</dc:creator><description>&lt;p&gt;Just grasping at straws...! Pete&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2864015</link><pubDate>Fri, 25 May 2007 10:55:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2864015</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Wes,&lt;/p&gt;
&lt;p&gt;I'd agree with you about the cost of implementing AOP or DBC, but ldtoken or better Attribute support would actually be _relatively_ easy to implement.&lt;/p&gt;
&lt;p&gt;For ldtoken, consider the following workaround which has been posted on various blogs and MSFT connect:&lt;/p&gt;
&lt;p&gt;MethodInfo GetMethod&amp;lt;T,A0,A1,...R&amp;gt; (Expression&amp;lt;Func&amp;lt;T,A0,A1,...R&amp;gt;&amp;gt; func)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;// pick methodinfo from expression tree&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;MethodInfo m = GetMethod ((StreamWriter w, string s) =&amp;gt; t.Write (s));&lt;/p&gt;
&lt;p&gt;an easier syntax to speficy this would be:&lt;/p&gt;
&lt;p&gt;MethodInfo m = methodof (StreamWriter, Write, string);&lt;/p&gt;
&lt;p&gt;in c++, you could define a macro to make that transformation:&lt;/p&gt;
&lt;p&gt;#define methodof(T,meth,A0) \&lt;/p&gt;
&lt;p&gt; &amp;nbsp;GetMethod ((T t, A0 a0) =&amp;gt; t.Write (a0));&lt;/p&gt;
&lt;p&gt;now if a preprocessor can do that, how hard could it be to have it in c#?&lt;/p&gt;
&lt;p&gt;of course, a nicer syntax would be&lt;/p&gt;
&lt;p&gt;MethodInfo m = methodof (StreamWriter.Write(string));&lt;/p&gt;
&lt;p&gt;since you operate on the AST, I think it makes little difference effort-wise. There will be stuff to consider more carefully of course, but that's true for partial methods just as well, and that's what got me started here.&lt;/p&gt;
&lt;p&gt;As for the attribute syntax, it'd be almost as easy to create a preprocessor that does a transformation to a workaround that is possible in c# today, although this preprocessor would have to know about the c# AST (classes and members basically, not expressions, statements or any semantics)&lt;/p&gt;
&lt;p&gt;I've already posted this with eric lippert (and I was just as OT as I'm right now...):&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/ericlippert/archive/2007/05/15/should-we-produce-warnings-for-unused-uninitialzied-internal-fields.aspx#2669506"&gt;http://blogs.msdn.com/ericlippert/archive/2007/05/15/should-we-produce-warnings-for-unused-uninitialzied-internal-fields.aspx#2669506&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It's just a workaround, granted, but anything better would probably turn the CLR upside down, including metadata format and reflection APIs. (But hey, if you'd touch this, you could add support for generics with variable-length type argument lists, like C++ 0x too ;-))&lt;/p&gt;
&lt;p&gt;(BTW, the attribute-workaround would make the ldtoken feature work in attributes to, which is where my team needs them most desperately!)&lt;/p&gt;
&lt;p&gt;It's encouraging though that you're considering some of that for post-orcas. You'd make a lot of people happy!&lt;/p&gt;
&lt;p&gt;Thanks for taking this serious!&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>Links</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2872284</link><pubDate>Fri, 25 May 2007 17:10:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2872284</guid><dc:creator>Mike Taulty's Blog</dc:creator><description>&lt;p&gt;Couple of interesting posts; Partial Methods I spent quite some time thinking about the difference here...&lt;/p&gt;
</description></item><item><title>Partial Methods</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2874683</link><pubDate>Fri, 25 May 2007 18:46:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2874683</guid><dc:creator>Israel A</dc:creator><description /></item><item><title>Partial Methods in VB</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2883492</link><pubDate>Sat, 26 May 2007 02:12:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2883492</guid><dc:creator>Panopticon Central</dc:creator><description /></item><item><title>Let us corrupt C# for code generators: The horror story of partial methods</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2885667</link><pubDate>Sat, 26 May 2007 03:44:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2885667</guid><dc:creator>Ayende @ Rahien</dc:creator><description>&lt;p&gt;Let us corrupt C# for code generators: The horror story of partial methods&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2892469</link><pubDate>Sat, 26 May 2007 09:10:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2892469</guid><dc:creator>Aaron</dc:creator><description>&lt;p&gt;How can making simple code like:&lt;/p&gt;
&lt;p&gt;int i = 3;&lt;/p&gt;
&lt;p&gt;C.M(i = 5);&lt;/p&gt;
&lt;p&gt;Console.WriteLine(i);&lt;/p&gt;
&lt;p&gt;Impossible to predict without knowing the entire class definition, a GOOD thing?&lt;/p&gt;
&lt;p&gt;May I suggest adding another keyword for calling partial methods?&lt;/p&gt;
&lt;p&gt;int i = 3;&lt;/p&gt;
&lt;p&gt;imisstheoldcsharpbeforetheygotsickwithfeaturecreep C.M(i = 5);&lt;/p&gt;
&lt;p&gt;Console.WriteLine(i);&lt;/p&gt;
</description></item><item><title>.Net 2.0 to 3.5 conversion notes</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2895664</link><pubDate>Sat, 26 May 2007 12:22:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2895664</guid><dc:creator>Lazy Coder</dc:creator><description>&lt;p&gt;1. Test Driven beta supports Orcas Beta 1 integration. I have been holding off converting one of our...&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2899231</link><pubDate>Sat, 26 May 2007 16:21:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2899231</guid><dc:creator>rbirkby</dc:creator><description>&lt;p&gt;Partial methods feel like premature optimization.&lt;/p&gt;
</description></item><item><title>How to pollute C#</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2901637</link><pubDate>Sat, 26 May 2007 19:27:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2901637</guid><dc:creator>Pawel Pabich's blog</dc:creator><description>&lt;p&gt;How to pollute C#&lt;/p&gt;</description></item><item><title>How to pollute C#</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2901649</link><pubDate>Sat, 26 May 2007 19:28:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2901649</guid><dc:creator>Blog</dc:creator><description>&lt;p&gt;How to pollute C#&lt;/p&gt;</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2901924</link><pubDate>Sat, 26 May 2007 19:59:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2901924</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Daniel:&lt;/p&gt;
&lt;p&gt;You are right. &amp;nbsp;The attributes are combined from both definitions.&lt;/p&gt;
&lt;p&gt;Pete:&lt;/p&gt;
&lt;p&gt;Aren't we all grasping at straws...;)&lt;/p&gt;
&lt;p&gt;Stefan:&lt;/p&gt;
&lt;p&gt;I agree that ldtoken looks easier to design and implement and we looked at doing it but decided against it for Orcas. &amp;nbsp;One problem that you touched on is how do we pick some method out of a method group with ldtoken.&lt;/p&gt;
&lt;p&gt;var f = infoof(C.F); &amp;nbsp;// what if there are multiple Fs&lt;/p&gt;
&lt;p&gt;We would need a way to specify method signatures which means extending the syntax or we would need variable arg infoof operator but that is a little strange. &amp;nbsp;This isn't as simple as it seems nor does it have a very small surface area. &amp;nbsp;It is still on the table but we were not satisfied with what we have.&lt;/p&gt;
&lt;p&gt;I would also love variable length type argument lists.&lt;/p&gt;
&lt;p&gt;Ayende:&lt;/p&gt;
&lt;p&gt;Could you explain the horror?&lt;/p&gt;
&lt;p&gt;Aaron:&lt;/p&gt;
&lt;p&gt;That may be true but it could be worse...consider conditional methods. &amp;nbsp;You already don't know if the call and the evaluation of the arguments occurs until you know if C.M is a conditional method *and* whether or not the definitions it depends upon are in fact defined.&lt;/p&gt;
&lt;p&gt;I really think the IDE should do something here to help people out like gray out conditional methods and partial methods (at the call site and the declaration) that are removed.&lt;/p&gt;
&lt;p&gt;RBirkby:&lt;/p&gt;
&lt;p&gt;It does feel that way doesn't it. &amp;nbsp;You might ask why not have the JIT optimize this somehow but that won't work because the metadata bloat is still there and it would require new CLR mechanics to accomplish the same semantics. &amp;nbsp;You might ask why not have the C# compiler just optimize the situation but that wouldn't be an optimization because it would change semantics both at the call site and in terms of reflection.&lt;/p&gt;
&lt;p&gt;Like I said before much of the same thing can be accomplished by subclassing and virtual methods in combination with a pattern that abstracts creation like the factory pattern. &amp;nbsp;The big difference is that here the metadata is much less because it removes the methods and the call sites are modified.&lt;/p&gt;
&lt;p&gt;To All:&lt;/p&gt;
&lt;p&gt;Btw, I should also mention that it is illegal to call a removed conditional method or partial method in an expression tree. &amp;nbsp;The reason should be somewhat obvious...how do you represent it in the tree if it is gone?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2901946</link><pubDate>Sat, 26 May 2007 20:02:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2901946</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;I should also mention that by far the common case *should* be for users to *not* write calls to partial methods. &amp;nbsp;They should typically only provide implementions for them. &amp;nbsp;The definitions and the call sites should be typically generated by code generators.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2908972</link><pubDate>Sun, 27 May 2007 07:07:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2908972</guid><dc:creator>Aaron</dc:creator><description>&lt;p&gt;Yikes, I had forgotten about Conditional attributes. &amp;nbsp;Actually... that makes me wonder now, why do we need this if we already have the new partial methods if we already have the Conditional attribute?&lt;/p&gt;
&lt;p&gt;Anyways, you guys are of course free to do what you'd like with C#, its yours of course. &amp;nbsp;This feature is not the end of the world or anything. &amp;nbsp;It just irks me, and people like me I think, when features are added that just increase the complexity of the language without adding much real benefit to the coders out there. &amp;nbsp;Especially when the feature is added for the benefit of the automated designer instead of the user ;) &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just wonder if instead of making C# 3 (or is it 3.5?) you all should have created a new language to put all those new features in rather than adding them to C#, maybe you could have kept C omega around for instance. &amp;nbsp;Remember that one of the reasons that people were very happy to move from C++ to Java and C# was that they were both much simpler languages. &amp;nbsp;That is not as much the case as it used to be. &amp;nbsp; &lt;/p&gt;
&lt;p&gt;I am looking forward to a bunch of features in C# 3, but I am a pretty experienced developer and am proficient in C# and C++. &amp;nbsp;I can handle this stuff and understand it and enjoy it. &amp;nbsp;I dont know about most programmers. &amp;nbsp;It seems to me this stuff is going to do more harm than good in the long run.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2923827</link><pubDate>Sun, 27 May 2007 21:06:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2923827</guid><dc:creator>Sadek Drobi</dc:creator><description>&lt;p&gt;Nice to hear back from you Wes,&lt;/p&gt;
&lt;p&gt;Well actually myself i dont like code generators, so i would agree with some of the points of Stefan.&lt;/p&gt;
&lt;p&gt;I ve been waiting for the beta expecting to c anonymous classes, but they are not there :(&lt;/p&gt;
&lt;p&gt;I really beleive that they add a lot together with extension methods... Anyway, waiting for the release!&lt;/p&gt;
</description></item><item><title>Partial Methods - I Object?</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2934167</link><pubDate>Mon, 28 May 2007 07:48:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2934167</guid><dc:creator>Certifications and Software Development</dc:creator><description>&lt;p&gt;No, not partial classes. Partial methods. As Wes talks about in his latest post on language enhancements&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2943653</link><pubDate>Mon, 28 May 2007 14:28:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2943653</guid><dc:creator>Dan</dc:creator><description>&lt;p&gt;I don't like the fact that it's impossible to determine if your function call, and possible side-effects, will be executed or not.&lt;/p&gt;
&lt;p&gt;Two suggestions:&lt;/p&gt;
&lt;p&gt;1) Give the partial/optional method special visibility, so that only partial classes that define the partial method can call it, either the &amp;quot;latent&amp;quot; or &amp;quot;actual&amp;quot; part. That way you won't be able to write in code that won't execute unless you specifically defined it to be optional in the same source file.&lt;/p&gt;
&lt;p&gt;Or 2) Make it necessary to add a keyword to the method calls &amp;quot;C.partial M(5);&amp;quot;, this way you will also be aware of that the method call might never happen.&lt;/p&gt;
&lt;p&gt;I think I prefer #1 over #2, but it might restrict its usage a bit too much (for instance the logging example Derek mentioned).&lt;/p&gt;
&lt;p&gt;Of course you could combine both, forcing you to use the partial keyword if you have not defined the partial method in this source file.&lt;/p&gt;
&lt;p&gt;As for keyword for the &amp;quot;actual&amp;quot; method, how about &amp;quot;override partial&amp;quot; as a combined keyword?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2952973</link><pubDate>Tue, 29 May 2007 01:14:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2952973</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Wes, &lt;/p&gt;
&lt;p&gt;I'm not going to bother you here forever over off-topic stuff like infoof, but I think by showing how it can almost be implemented using the c preprocessor, I've set the bar for justified rejection a bit higher than just claiming that it's a bit harder (although it's not beyond me to imagine it might be).&lt;/p&gt;
&lt;p&gt;While it would be interesting to follow up on this (or the attribute proposal, for that matter), the elephant in the kitchen is the fact that there is no process for discussing c# enhancements within the community before everything is written in stone.&lt;/p&gt;
&lt;p&gt;The way you're designing C# seems to work better in some aspects than the java community process, so I'm not sure how far you should really go. But getting feedback and discussing suggestions early is definately overdue. You can do that easily without losing control. There'd be a lot of noise to filter out, but that's hardly an excuse for not doing anything at all. Hear us while it makes a difference, there's going to be usefull stuff in it for you! Plus, language competition is increasing lately. You don't want to lose the language geeks, do you?&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
&lt;p&gt;PS: Is AOP really an effort problem, or is it true that anders just hates it with a vengeance?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2956057</link><pubDate>Tue, 29 May 2007 03:50:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2956057</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;I agree with Stefan Wenig.&lt;/p&gt;
&lt;p&gt;There are so many other features that need to be implemented. This one has very little actual value, but increases the complexity of of the language and manageability of code substantially.&lt;/p&gt;
&lt;p&gt;Judging from the usages cases I have read here, I do not think I will have any practical use for it. And I hope that I do not see it when I review other people's code.&lt;/p&gt;
&lt;p&gt;The case for designers is very marginal. While I am not very fond of designers and prefer to write my own code, I recognize that many people use them. However, I am outraged that you would pollute the language for all to justify designers of all things.&lt;/p&gt;
&lt;p&gt;There are precisely two features that I want, and I have been asking for them since before Whidbey was in beta.&lt;/p&gt;
&lt;p&gt;1) Generic variance.&lt;/p&gt;
&lt;p&gt;2) Operator constants.&lt;/p&gt;
&lt;p&gt;Until these features are introduced, I must resort to editing some of my code directly in IL to overcome these limitations.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2960476</link><pubDate>Tue, 29 May 2007 09:02:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2960476</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Brian, &lt;/p&gt;
&lt;p&gt;generic variance (though it would have to be optional) would be really great, agreed. I guess we've all had our problems with that stuff, including copying whole lists to their base class type. &lt;/p&gt;
&lt;p&gt;When implemented like arrays, it would also mitigate the problem that generic classes do not have a common base type - they would all derive from GenericType&amp;lt;object&amp;gt;! (well, except value types, again)&lt;/p&gt;
&lt;p&gt;what are operator constants?&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>Required rather than optional partial methods</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2962711</link><pubDate>Tue, 29 May 2007 10:46:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2962711</guid><dc:creator>Kasper Østerbye</dc:creator><description>&lt;p&gt;My code generation scenario is slightly different. I should like to produce a partial class from a UML style class diagram. Partial classes are the right thing, as code level information is then added in an other source file. However, I should like the generator to produce the declaration of methods, so that the rest of the code can use these methods. The compilers job is then to *ensure* that these method stubs are actually implemented in some other partial class, that is the implementation is required by the compiler, the calls should not be removed. &lt;/p&gt;
&lt;p&gt;Btw, this seems like reverse aspect oriented programming, you write all the aspects inline, but remove them at compile time if you do not need them :-)&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2964376</link><pubDate>Tue, 29 May 2007 12:02:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2964376</guid><dc:creator>Samuel Jack</dc:creator><description>&lt;p&gt;What about requiring partial methods to be protected or private? This would limit visibility to places where callers are most likely to understand the intention of the method.&lt;/p&gt;
</description></item><item><title>How do you unit test an anonymous delegate or lambda?</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2971550</link><pubDate>Tue, 29 May 2007 19:40:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2971550</guid><dc:creator>Tom Kirby-Green</dc:creator><description>&lt;p&gt;I know this is going off topic - but this caused me to run into a mental brick wall today. With the incresing use of anonymous blocks of code in form of anonymous delegates or lambdas how do you unit test? How can you build a framwork reach in and verify an essentially unnamed chunk of logic. Do we have to start referring to those lovely compiler generated mangled names? How are folks unit testing their anonymous code blocks today? Help! :-)&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2972706</link><pubDate>Tue, 29 May 2007 21:04:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2972706</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;To All:&lt;/p&gt;
&lt;p&gt;Partial methods *must* be private.&lt;/p&gt;
&lt;p&gt;Aaron:&lt;/p&gt;
&lt;p&gt;Partial methods differ from conditional methods in that the method is removed as well as the call sites.&lt;/p&gt;
&lt;p&gt;Sadek:&lt;/p&gt;
&lt;p&gt;What are anonymous classes? &amp;nbsp;Do you mean anonymous types?&lt;/p&gt;
&lt;p&gt;Dan:&lt;/p&gt;
&lt;p&gt;Good ideas. &amp;nbsp;I will bring it up.&lt;/p&gt;
&lt;p&gt;Stefan:&lt;/p&gt;
&lt;p&gt;That would be fantastic for a prototype but not for a finished language feature. &amp;nbsp;I am not sure that the syntax is quite right yet which is what I was alluding to before.&lt;/p&gt;
&lt;p&gt;There are some ways to discuss language enhancements but I will bring up the issue with Mads. &amp;nbsp;Until then try making suggestions, I know that the suggestions *are* evaluated for possible enhancements.&lt;/p&gt;
&lt;p&gt;The general consensus is that we like AOP, but we are not sure if it is ready for primetime yet. &amp;nbsp;It is continually being evaluated for inclusion.&lt;/p&gt;
&lt;p&gt;Brian:&lt;/p&gt;
&lt;p&gt;Thanks for the feedback. &amp;nbsp;We were talking about covariant generics again just the other day in the design meeting. &amp;nbsp;What do mean by operator constants?&lt;/p&gt;
&lt;p&gt;Kasper:&lt;/p&gt;
&lt;p&gt;Good to hear from you! &amp;nbsp;That scenario makes a lot of sense. &amp;nbsp;I wanted exactly that when I was writing some compiler generation tools. &amp;nbsp;You are right, it is kind of reverse AOP.&lt;/p&gt;
&lt;p&gt;Samuel:&lt;/p&gt;
&lt;p&gt;Partial methods *must* be private. &amp;nbsp;That is a very important point.&lt;/p&gt;
&lt;p&gt;Tom:&lt;/p&gt;
&lt;p&gt;Do you mean how are people testing the actual anonymous code blocks or how are people testing functions which take delegates?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2973711</link><pubDate>Tue, 29 May 2007 22:39:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2973711</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;You are of course right, without even mentioning the problem of out/ref parameters this is not perfect. It was just ment to be an indicator of how hard it could be. But I'm beating my point to death...&lt;/p&gt;
&lt;p&gt;As for the discussion process, I know that there are ways, but they basically all suck. I can make suggestions at connect, but that's no place to discuss stuff. I'm not talking about voting either, things like AOP are far too complicated to be discussed in this matter. I'd like to see a discussion between language geeks inside and outside of MSFT, voices from framework developers (the nhibernate/castle kind) and application developers, etc. This is all happening in the blogosphere - except that it's fragmented and the C# team is not really participating. &lt;/p&gt;
&lt;p&gt;As for AOP: Have research build a prototype while you absorb the good bits from spec# into C# - this has worked quite well with Comega and LINQ, I guess everyone would like to see this success story repeat!&lt;/p&gt;
&lt;p&gt;You're doing good work, but everyone can use some help and some outside perspective from time to time. And there's more to that than posting suggestions. If you find a way to make this fly, I'm gonna drown your blog in praise! ;-)&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2973759</link><pubDate>Tue, 29 May 2007 22:44:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2973759</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Tom, &lt;/p&gt;
&lt;p&gt;how do you unit test private methods? You could invoke them using Reflection, but the truth is that the need to do this is rather rare even in TDD. They are usually tested indirectly via the public methods that use them, and it's going to be the same with anonymous methods.&lt;/p&gt;
&lt;p&gt;In the rare cases where you absolutely have to test them, you could still pass mock objects to the outer (named) methods and have the mock accept the anonymous one. Like using Reflection, this is not too much fun, so it should be the exception.&lt;/p&gt;
&lt;p&gt;Stefan&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2973875</link><pubDate>Tue, 29 May 2007 22:54:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2973875</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Stefan:&lt;/p&gt;
&lt;p&gt;We want that kind of experience. &amp;nbsp;The team regularly has open discussions with MVPs about the language. &amp;nbsp;We also have online chats that are open invite as far as I am aware. &amp;nbsp;If we see stuff out in blogs then we try to comment and participate. &amp;nbsp;So I guess one big question is where in the blogosphere is this happening that we are not participating?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2975374</link><pubDate>Wed, 30 May 2007 00:24:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2975374</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;You know, I see the odd comment from an MS guy here and there, but it doesn't add up to give me the feeling that there's an active participation. Probably depends on the blogs one has subscribed. You miss some, I miss some, in the end you just hope to stumble across stuff. It's very unstructured too, I'm sure you can do much better that this if you actually do some kind of coordinated effort. A forum or a wiki where all kinds of language features can be discussed in detail would be a so much better place to do this. This has worked before in other contexts, so why not try it? &lt;/p&gt;
&lt;p&gt;I sometimes post to MS blogs off-topic, but this is the first time that this resulted in a dialoge like this one. MVPs are a somewhat closed group too, and chats are easily missed. I'm afraid I can't give you any detailed info on what's missing, just my feeling that the status quo is dissatisfactory and I think you'd easily figure out a better way I you agreed to that notion.&lt;/p&gt;
&lt;p&gt;From what I gather from other people's blogs, I think there are quite a few people who feel the same way. Like I said, competition in the language area is rising, so what was good enough some years ago might not do it today. &lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2982907</link><pubDate>Wed, 30 May 2007 10:07:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2982907</guid><dc:creator>mattwar</dc:creator><description>&lt;p&gt;Yes, yes, yes. This is the inverse of AOP. &amp;nbsp;With AOP you manually write a bunch of code and rules and then run a tool that programmatically identifies hook points in your code based on your rules and injects new code at those hook points. With partial methods you run a tool to programmatically generate a bunch of code with pre-defined hook points and then later manually write code to get called at those hook points.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2987808</link><pubDate>Wed, 30 May 2007 15:29:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2987808</guid><dc:creator>brian</dc:creator><description>&lt;p&gt;wes,&lt;/p&gt;
&lt;p&gt;Sorry about the late response.&lt;/p&gt;
&lt;p&gt;I am thrilled to hear that the team is reconsidering covariant generics. I think that feature work will need to be done first in the CLR though. Please keep us updated on any developments.&lt;/p&gt;
&lt;p&gt;Just for reference, Microsoft Research produced a great document discussing covariant generic issues and solutions:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://research.microsoft.com/research/pubs/view.aspx?type=inproceedings&amp;amp;id=1215"&gt;http://research.microsoft.com/research/pubs/view.aspx?type=inproceedings&amp;amp;id=1215&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By &amp;quot;operator constraints&amp;quot;, I mean a way of constraining a generic T to an interface that defines operator overloads. In a generic type, you need to prove to the compiler that a type T does in fact contain the desired methods before it be called. This is done like:&lt;/p&gt;
&lt;p&gt; where T : IFoo&lt;/p&gt;
&lt;p&gt;Operator overloads, due to their implementation details (which I should not need to care about), must be static. An (C#) interface can not contain static methods. Therefore, I can not prove to the compiler that my type T actually does override specific operators.&lt;/p&gt;
&lt;p&gt;Consider the following type (hopefully the formating goes through):&lt;/p&gt;
&lt;p&gt;struct Foo&amp;lt;T&amp;gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public Foo(T bar)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;this.bar = bar;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public static Foo&amp;lt;T&amp;gt; operator+ (Foo&amp;lt;T&amp;gt; f1, Foo&amp;lt;T&amp;gt; f2)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// Error CS0019: Operator '+' cannot be&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// applied to operands of type 'T' and 'T'&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return new Foo&amp;lt;T&amp;gt;(f1.Bar + f2.Bar);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public T Bar&lt;/p&gt;
&lt;p&gt; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return bar;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;private readonly T bar;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;As noted, this will error because T may not contain an operator+ method. Ideally I would create an interface with the desired method and constrain the T to it. However, due to their static nature, that is not possible. Thus, I must give up overloaded operators or use ugly alternatives, neither of which are very desirable.&lt;/p&gt;</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2989397</link><pubDate>Wed, 30 May 2007 18:18:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2989397</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Brian:&lt;/p&gt;
&lt;p&gt;Ah, operator *constraints*...yes I know what those are. &amp;nbsp;We talk about constraints often too.&lt;/p&gt;
&lt;p&gt;And we are in regular contact with the MSR folks.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#2989553</link><pubDate>Wed, 30 May 2007 18:37:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2989553</guid><dc:creator>Tom Kirby-Green</dc:creator><description>&lt;p&gt;What I meant was how are people testing actual anonymous code blocks. The 'anonymous logic' coding style seems somewhat TDD hostile. Don't get me wrong I love anonymous delegates and their kin - but am concerned about the testing issue also.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3002845</link><pubDate>Thu, 31 May 2007 09:41:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3002845</guid><dc:creator>Sadek Drobi</dc:creator><description>&lt;p&gt;no i mean anonymous classes...&lt;/p&gt;
&lt;p&gt;so that i can define extension methods for an interface, then i implement anonymous classes that implement the interface. this way they inherit the extension methods.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3003970</link><pubDate>Thu, 31 May 2007 11:08:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3003970</guid><dc:creator>Stefan Wenig</dc:creator><description>&lt;p&gt;Tim, that's what I understood, but let me try to be a bit more specific. How do you test this lambda:&lt;/p&gt;
&lt;p&gt;public void foo () {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;bar (a =&amp;gt; 2*a);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;The answer is of course: By testing foo. From a testability point of view, it's in fact no different from this:&lt;/p&gt;
&lt;p&gt;public void foo() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;... = bar (...);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;private int bar (int a) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;return a * 2; &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Since bar is private, you can't easily test it directly, and experience shows that it's usually not necessary. Now if you really had to do it, you'd have to do something ugly like this:&lt;/p&gt;
&lt;p&gt;MethodInfo m = type.GetMethod (&amp;quot;bar&amp;quot;, BindingFlags.NonPublic | BindingFlags.Instance, new Type[] { typeof (int) });&lt;/p&gt;
&lt;p&gt;Assert.Equals (4, m.Invoke (obj, new object[] {2});&lt;/p&gt;
&lt;p&gt;You think this is TDD-friendly? No, it just works because you dont have to do it often.&lt;/p&gt;
&lt;p&gt;And there is an ugly workaround for testing anonymous delegates too. You need to pass the object that accepts the delegate via an interface and mock it:&lt;/p&gt;
&lt;p&gt;public void foo (IXY xy) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;xy.bar (a =&amp;gt; a * 2);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;class XYMock: IXY {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public void bar (Func&amp;lt;int,int&amp;gt; f) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Assert.Equals (4, f(2));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Assert.Equals (0, f(0));&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;[Test] FooBar() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;IXY mock = new XYMock();&lt;/p&gt;
&lt;p&gt; &amp;nbsp;obj.foo (mock);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;So just like directly testing private methods, it's possible but ugly, and fortunately you don't need to do it a lot.&lt;/p&gt;
&lt;p&gt;Btw, you could also make this more flexible by passing the actual test to the mock via a delegate, if that does not exceed your mental delegate stack depth ;-)&lt;/p&gt;
&lt;p&gt;[Test] FooBar() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;obj.foo (new XYMock (2, r =&amp;gt; Assert.Equals (4, r)));&lt;/p&gt;
&lt;p&gt; &amp;nbsp;obj.foo (new XYMock (0, r =&amp;gt; Assert.Equals (4, 0)));&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3004902</link><pubDate>Thu, 31 May 2007 12:37:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3004902</guid><dc:creator>Gunter</dc:creator><description>&lt;p&gt;I know this is off-topic now, but i wanted to say something about (against) operator constraints :)&lt;/p&gt;
&lt;p&gt;The way constraints in C# work right now is that they enable you to program against &amp;quot;behaviors&amp;quot; of generic parameters. These behaviors are expressed by interfaces, that's exactly what interfaces are for.&lt;/p&gt;
&lt;p&gt;If you go down the road of &amp;quot;operator constraints&amp;quot; you will end at constraints which just check if a certain method signature is existing in a generic parameter. But two different classes implementing a method with the same signature don't necessarily have the same semantics. &lt;/p&gt;
&lt;p&gt;You have that problem too even if you stay only with operator constraints. A operator+ means something entirely different for an int and a string.&lt;/p&gt;
&lt;p&gt;The right thing to solve the problem is to introduce an interface describing the behavior you want to use: All basic number types (byte, int16, int32, int64, float, double) should be derived from an generic interface IBasicArithmetic&amp;lt;T&amp;gt; which defines the four basic operators Add, Subtract, Multiply and Divide.&lt;/p&gt;
&lt;p&gt;This still means you have to use t1.Add(t2) instead if t1 + t2, but i think one can live with that (and probably an operator+ could be implemented inside the generic class using the IBasicArithmetic interface to reenable that).&lt;/p&gt;
&lt;p&gt;Gunter&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3009999</link><pubDate>Thu, 31 May 2007 19:32:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3009999</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Gunter,&lt;/p&gt;
&lt;p&gt;I basically agree and have argued for a similar system in the past. The lack of an IBasicArithmetic&amp;lt;T&amp;gt; interface makes it impossible to know what can be added and whatnot. I do not really care about the actual implementation. In the end, I just want to be enable the usage scenario.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3019616</link><pubDate>Fri, 01 Jun 2007 09:55:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3019616</guid><dc:creator>Gunter</dc:creator><description>&lt;p&gt;This IBasicArithmetic&amp;lt;T&amp;gt; interface would be really helpful in some generic scenarios and i think it could included in Orcas rather easily. Surely much easier than operator constraints (i never thought operators should be used for more than arithmetic types and strings anyway).&lt;/p&gt;
&lt;p&gt;Is this being considered (I didn't have a look at the beta yet)? Or where is the best place to vote for? :)&lt;/p&gt;
&lt;p&gt;Gunter&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3026264</link><pubDate>Fri, 01 Jun 2007 18:33:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3026264</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;Gunter,&lt;/p&gt;
&lt;p&gt;I think it should be a little more fine-grain control. For example, it makes sense to add (and maybe even subtract) two strings, but what does it mean to multiple or divide two strings? There are many other examples where some operations make sense, while others do not. Thus, I propose the following:&lt;/p&gt;
&lt;p&gt;public interface IAddable&amp;lt;T&amp;gt; {...}&lt;/p&gt;
&lt;p&gt;public interface ISubtractable&amp;lt;T&amp;gt; {...}&lt;/p&gt;
&lt;p&gt;public interface IMultiplyable&amp;lt;T&amp;gt; {...}&lt;/p&gt;
&lt;p&gt;public interface IDivisible&amp;lt;T&amp;gt; {...}&lt;/p&gt;
&lt;p&gt;public interface IBasicArithmetic&amp;lt;T&amp;gt; : IAddable&amp;lt;T&amp;gt;, ISubtractable&amp;lt;T&amp;gt;, IMultiplyable&amp;lt;T&amp;gt;, IDivisible&amp;lt;T&amp;gt; {}&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3036993</link><pubDate>Sat, 02 Jun 2007 09:50:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3036993</guid><dc:creator>wesdyer</dc:creator><description>&lt;p&gt;Gunter &amp;amp; Brian:&lt;/p&gt;
&lt;p&gt;Great ideas. &amp;nbsp;Post them as suggestions to the team. &amp;nbsp;The suggestions are triaged.&lt;/p&gt;
&lt;p&gt;Btw, you said something about signatures not ensuring semantics. &amp;nbsp;This is true but interfaces do ensure semantics either.&lt;/p&gt;
&lt;p&gt;You also might want to look at type classes in Haskell. &amp;nbsp;They are very similar to what you want.&lt;/p&gt;
&lt;p&gt;Sadek:&lt;/p&gt;
&lt;p&gt;That won't be in Orcas. &amp;nbsp;Hopefully next go around something can be done.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3044630</link><pubDate>Sat, 02 Jun 2007 16:33:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3044630</guid><dc:creator>Gunter</dc:creator><description>&lt;p&gt;Brian,&lt;/p&gt;
&lt;p&gt;Good idea, signed by me :)&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3046359</link><pubDate>Sat, 02 Jun 2007 18:20:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3046359</guid><dc:creator>Brian</dc:creator><description>&lt;p&gt;There are already a number of similar suggestions on Connect. All are slightly different, but generally amount to the same feature request. See IDs 91040, 92816, and 90956, and probably others, for details.&lt;/p&gt;
&lt;p&gt;Do you suggest another variation be submitted?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3159168</link><pubDate>Fri, 08 Jun 2007 13:19:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3159168</guid><dc:creator>Thomas Eyde</dc:creator><description>&lt;p&gt;My turn-off to this is that partial methods looks like a method, walks like a method, but doesn't quack.&lt;/p&gt;
&lt;p&gt;If I can't decide what to return, or the scope of visibility, it isn't a method at all. Not to me.&lt;/p&gt;
&lt;p&gt;And it's unfortunate that parameters aren't always evaluated. Now I get a new, powerful tool to create more subtle bugs.&lt;/p&gt;
</description></item><item><title>LINQ to SQL (Part 4 - Updating our Database)</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3817305</link><pubDate>Wed, 11 Jul 2007 20:00:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3817305</guid><dc:creator>ScottGu's Blog</dc:creator><description>&lt;p&gt;Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL. LINQ to SQL&lt;/p&gt;
</description></item><item><title>LINQ to SQL (Part 4 - Updating our Database)</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3817407</link><pubDate>Wed, 11 Jul 2007 20:13:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3817407</guid><dc:creator>BusinessRx Reading List</dc:creator><description>&lt;p&gt;Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL. LINQ to SQL&lt;/p&gt;
</description></item><item><title>LINQ to SQL (Part 4 - Updating our Database)</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3817611</link><pubDate>Wed, 11 Jul 2007 20:32:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3817611</guid><dc:creator>ASP.NET</dc:creator><description>&lt;p&gt;Over the last few weeks I've been writing a series of blog posts that cover LINQ to SQL. LINQ to SQL&lt;/p&gt;
</description></item><item><title>Partial Methods</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3827582</link><pubDate>Thu, 12 Jul 2007 11:50:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3827582</guid><dc:creator>Easy Company</dc:creator><description>&lt;p&gt;在 .net framework 3.5 中增加了一个新的功能叫做分部方法（partial method，因在.net framework 2.0中partial class在msdn中译做分部类型，所以此处暂称为分部方法）。分部方法是一些方法，它使轻量级的事件处理成为可行。它被包含在VS 2008 Beta2中的 VB 和 C# 中，本文将以C#来说明...&lt;/p&gt;
</description></item><item><title>Validation and Business Logic using LINQ to SQL</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3833885</link><pubDate>Thu, 12 Jul 2007 19:19:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3833885</guid><dc:creator>Public Sector Developer Weblog</dc:creator><description>&lt;p&gt;I have spoken to quite a few customers about LINQ &amp;amp;amp; LINQ to SQL over the last few months. Oddly enough,&lt;/p&gt;
</description></item><item><title>Validation and Business Logic using LINQ to SQL</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#3834057</link><pubDate>Thu, 12 Jul 2007 19:43:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3834057</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;I have spoken to quite a few customers about LINQ &amp;amp;amp; LINQ to SQL over the last few months. Oddly enough&lt;/p&gt;
</description></item><item><title>[Visual Studio] Les nouveautés de la Beta 2 de Visual Studio 2008 et du Framework .NET 3.5 Beta 2 !</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4076399</link><pubDate>Fri, 27 Jul 2007 10:29:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4076399</guid><dc:creator>Thomas Lebrun</dc:creator><description>&lt;p&gt;La Beta 2 de Visual Studio 2008 est arriv&amp;#233;e tr&amp;#232;s r&amp;#233;cemment et avec elle, on retrouve pas mal de petites&lt;/p&gt;
</description></item><item><title>C# 3.0中的分部方法</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4131298</link><pubDate>Mon, 30 Jul 2007 16:49:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4131298</guid><dc:creator>Anders Liu</dc:creator><description>&lt;p&gt;在看C#语言的What's New时，突然发现新特性列表的最后，多出了一个“Partial Method Definitions ”，但并不像其他新特性一样有超链接链接到其说明。上网搜索了一下，关于分部类型的信息非常少。尤其是中文信息，只有CSDN的 周融 在其《C# 3.5 语言在 Visual Studio Orcas Beta 1 上的新增功能(二) 》一文的最后提到了这个分部方法，但没有进一步说明。英文技术文章中，倒是有两篇不错的：&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx"&gt;http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard - new proposed keyword 'ghost'.</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4303793</link><pubDate>Thu, 09 Aug 2007 06:31:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4303793</guid><dc:creator>Joe Rattz</dc:creator><description>&lt;p&gt;Hey, since no one likes the keyword 'partial', how about 'ghost'? &amp;nbsp;If an implementation doesn't exist all hints of the method just vanish.&lt;/p&gt;
</description></item><item><title>C# 3.0 - Partial Methods</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4543143</link><pubDate>Fri, 24 Aug 2007 16:44:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4543143</guid><dc:creator>Darth Bundy</dc:creator><description>&lt;p&gt;Firstly, I must confess that up until now I have not really known about partial methods. Whenever I encountered&lt;/p&gt;
</description></item><item><title>Partially Speaking…</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4635815</link><pubDate>Thu, 30 Aug 2007 02:20:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4635815</guid><dc:creator>BenkoBlog</dc:creator><description>&lt;p&gt;A good question on Partial Methods Yesterday in Kansas City I got a question during the LINQ session&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4779846</link><pubDate>Thu, 06 Sep 2007 08:30:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4779846</guid><dc:creator>ajdotnet</dc:creator><description>&lt;p&gt;My feedback was too long for a comment ;-)&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://ajdotnet.wordpress.com/2007/09/04/partial-methods-for-partial-developers/"&gt;http://ajdotnet.wordpress.com/2007/09/04/partial-methods-for-partial-developers/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>http://www.itgalary.com/forum_posts.asp?TID=584</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4782087</link><pubDate>Thu, 06 Sep 2007 11:28:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4782087</guid><dc:creator>http://www.itgalary.com/forum_posts.asp?TID=584</dc:creator><description>&lt;p&gt;Can find simple examples for VB.net partial methods. helpfull for newbies&lt;/p&gt;
</description></item><item><title>Future Breaking Changes, Part Two</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4789558</link><pubDate>Thu, 06 Sep 2007 18:48:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4789558</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description>&lt;p&gt;Last time I mentioned that one of the subtleties of programming language design is weighing the benefit&lt;/p&gt;
</description></item><item><title>Compiler constraints</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#4913812</link><pubDate>Fri, 14 Sep 2007 18:55:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4913812</guid><dc:creator>Drew Noakes</dc:creator><description>&lt;p&gt;Would the compiler raise a low-priority warning if you attempted to define the latent and actual methods in the same file? &amp;nbsp;It seems to me that a warning here might help people understand the feature a little better.&lt;/p&gt;
</description></item><item><title>From partial classes, now also partial methods.</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#5120674</link><pubDate>Tue, 25 Sep 2007 16:21:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5120674</guid><dc:creator>Wesley Walraeve</dc:creator><description>&lt;p&gt;We all know the great new feature in .NET 2.0 framework &amp;amp;quot;Partial classes&amp;amp;quot;. You can write code&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#5292720</link><pubDate>Fri, 05 Oct 2007 15:57:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5292720</guid><dc:creator>Paul Sanders</dc:creator><description>&lt;p&gt;Very helpful writeup; well written, concise and easy to follow. Thanks very much.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#5384618</link><pubDate>Tue, 09 Oct 2007 21:39:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5384618</guid><dc:creator>chris lively</dc:creator><description>&lt;p&gt;If I catch anyone working for me using partial methods I will fire them on the spot.&lt;/p&gt;
&lt;p&gt;How much more difficult do you guys really think programming should be? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;This type of garbage will make debugging that much more difficult without adding any real value to the language. &amp;nbsp;Why not just through this in the VB.net language and leave C# alone.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#5741074</link><pubDate>Sun, 28 Oct 2007 18:30:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5741074</guid><dc:creator>John Chapman</dc:creator><description>&lt;p&gt;Thanks for spending the time to explain this new feature in .NET 3.5. &amp;nbsp;But I'm really concerned regarding the usages for such a feature. &amp;nbsp;It seems like we could use other mechanisms to accomplish the same thing, such as the event framework we already have. &amp;nbsp;This just seems like a really dangerous tool when a developer not realizing the implications gets a hold of it.&lt;/p&gt;
&lt;p&gt;For more detailed comments see my blog posting:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://jaychapman.blogspot.com/2007/10/partial-methods-what.html"&gt;http://jaychapman.blogspot.com/2007/10/partial-methods-what.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#5942769</link><pubDate>Tue, 06 Nov 2007 23:05:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5942769</guid><dc:creator>Bobby</dc:creator><description>&lt;p&gt;I know I am a Johnny Come Lately on this, but what if I add an implementation of OnUpdateName as an Extension will the compiler pick that up?&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#6677134</link><pubDate>Thu, 06 Dec 2007 12:16:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6677134</guid><dc:creator>Wesley</dc:creator><description>&lt;p&gt;@chris lively: If I had a boss reacting like that I would quit my job by myself.&lt;/p&gt;
&lt;p&gt;And your last sentence &amp;quot;Why not just through this in the VB.net language and leave C# alone&amp;quot; proves that you don't have a clue what .NET framework is. Stay on your graphical stuff and leave the real development for the experts.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#6758973</link><pubDate>Thu, 13 Dec 2007 13:56:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6758973</guid><dc:creator>Navaneeth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks. Can you tell then what will be the difference for this from delegates ?&lt;/p&gt;
</description></item><item><title>Partielle Methoden</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#6995289</link><pubDate>Sat, 05 Jan 2008 22:29:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6995289</guid><dc:creator>Thomas goes .NET</dc:creator><description>&lt;p&gt;Partielle Klassen gibt es seit zwei Jahren, also dem Release von .NET 2.0 und C# 2.0. Mit dem neuesten Release wurden nun auch partielle Methoden eingef&amp;#252;hrt, die das Konzept konsequent weiterf&amp;#252;hren. Was sind partielle Methoden? Sie folgen genau dem ..&lt;/p&gt;
</description></item><item><title>ScottGu之博客翻译－LINQ to SQL第四部分，更新数据库 LINQ to SQL (Part 4 - Updating our Database)</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#7001337</link><pubDate>Sun, 06 Jan 2008 08:46:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7001337</guid><dc:creator>韩现龙</dc:creator><description>&lt;p&gt;原贴链接： &lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database"&gt;http://weblogs.asp.net/scottgu/archive/2007/07/11/linq-to-sql-part-4-updating-our-database&lt;/a&gt;...&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#7843982</link><pubDate>Fri, 22 Feb 2008 05:13:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7843982</guid><dc:creator>Riaz Afridi</dc:creator><description>&lt;p&gt;Partial methods are only usefull for desingers not for developers?&lt;/p&gt;
&lt;p&gt;Developer may not use partical method, b/c it does not make sense, if I am not going to provide an implementation of a method why I would define the prototype and add a call to this method.&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#9127198</link><pubDate>Thu, 20 Nov 2008 06:25:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9127198</guid><dc:creator>Rick O'Shay</dc:creator><description>&lt;p&gt;This is relatively clean but at some point they need to stop adding syntax sugar in the name of economic code or meta data. CPU cycles and bytes are cheaper by the day. Let's profile code, then optimize if and only if there is a bottleneck in the actual running of the application. &lt;/p&gt;
&lt;p&gt;That you have to return void is obviously an internal implementation issue that is foisted on users of the language. When a language starts to break orthogonality, bad things happen. Can methods return values in C#? The correct answer, now, is &amp;quot;it depends&amp;quot;. &lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#9543848</link><pubDate>Fri, 10 Apr 2009 22:08:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9543848</guid><dc:creator>Chetan</dc:creator><description>&lt;p&gt;Check this: &lt;a rel="nofollow" target="_new" href="http://blog.newtonicaonline.com/2009/04/11/problem-with-partial-method-c-30/"&gt;http://blog.newtonicaonline.com/2009/04/11/problem-with-partial-method-c-30/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: In Case You Haven't Heard</title><link>http://blogs.msdn.com/wesdyer/archive/2007/05/23/in-case-you-haven-t-heard.aspx#9543892</link><pubDate>Fri, 10 Apr 2009 22:39:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9543892</guid><dc:creator>Chetan</dc:creator><description>&lt;p&gt;Please remove link above. It is broken. Sorry.&lt;/p&gt;
</description></item></channel></rss>