<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6800934446457898793.post5269196037317404084..comments</id><updated>2010-07-04T08:50:42.777-04:00</updated><category term='trueskill'/><category term='aes'/><title type='text'>Comments on Moserware: Borrowing Ideas From 3 Interesting *Internal* Clas...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.moserware.com/feeds/5269196037317404084/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html'/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Zfbv3mHcYrc/SLDM--5fn8I/AAAAAAAAA1w/EZtLwWvYhdI/S220/facebook+beard2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-8018521876301942564</id><published>2008-01-28T22:10:00.000-05:00</published><updated>2008-01-28T22:10:00.000-05:00</updated><title type='text'>Greg: very interesting! Thanks for the info. I'll ...</title><content type='html'>Greg: very interesting! Thanks for the info. I'll have to try it out.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/8018521876301942564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/8018521876301942564'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1201576200000#c8018521876301942564' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-6238018212598189281</id><published>2008-01-28T19:38:00.000-05:00</published><updated>2008-01-28T19:38:00.000-05:00</updated><title type='text'>spec# errors (through boogie) can also show up as ...</title><content type='html'>spec# errors (through boogie) can also show up as warnings ... its just a matter of enabling it in your project...&lt;BR/&gt;&lt;BR/&gt;To do this right click on your project and go to properties ... then go to build ... under misc there is an item called "RunProgramVerifier" it is set to false by default, set it to true and off you go.&lt;BR/&gt;&lt;BR/&gt;You might also want to try RunProgramVerifierWhileEditting which will incrementally run it and give you squiggly lines while you type.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/6238018212598189281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/6238018212598189281'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1201567080000#c6238018212598189281' title=''/><author><name>Greg</name><uri>http://www.blogger.com/profile/12937333845136986760</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-431219091'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2894981720547117753</id><published>2008-01-23T18:51:00.000-05:00</published><updated>2008-01-23T18:51:00.000-05:00</updated><title type='text'>Greg: Thanks for the info! I hadn't actually tried...</title><content type='html'>Greg: Thanks for the info! I hadn't actually tried running spec# with an error, but it's good to know. &lt;BR/&gt;&lt;BR/&gt;I'm also curious how far Boogie's help goes with projects like &lt;A HREF="http://research.microsoft.com/Pex/" REL="nofollow"&gt;Pex&lt;/A&gt;. Something like Spec# for compiler errors and Pex/Boogie for warnings.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/2894981720547117753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/2894981720547117753'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1201132260000#c2894981720547117753' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-3821260427433735891</id><published>2008-01-23T15:26:00.000-05:00</published><updated>2008-01-23T15:26:00.000-05:00</updated><title type='text'>Jeff wrote:&lt;br&gt;&lt;br&gt;"t's not much of a leap to go f...</title><content type='html'>Jeff wrote:&lt;BR/&gt;&lt;BR/&gt;"t's not much of a leap to go from (to use your example)&lt;BR/&gt;&lt;BR/&gt;public virtual void CopyTo(Array! array, int index) {...}&lt;BR/&gt;&lt;BR/&gt;to looking at the call sites like&lt;BR/&gt;&lt;BR/&gt;al.CopyTo(null, 0)&lt;BR/&gt;&lt;BR/&gt;and throwing a compile time error saying that this violates the contract. That is really cool stuff."&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;You do realize spec# already does *exactly* this ... the "boogie" portion of spec# is a full theorem prover and does give errors at compiler time.&lt;BR/&gt;&lt;BR/&gt;Cheers,&lt;BR/&gt;&lt;BR/&gt;Greg</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/3821260427433735891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/3821260427433735891'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1201119960000#c3821260427433735891' title=''/><author><name>Greg</name><uri>http://www.blogger.com/profile/12937333845136986760</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-431219091'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-5563934077316593999</id><published>2008-01-19T03:41:00.000-05:00</published><updated>2008-01-19T03:41:00.000-05:00</updated><title type='text'>Hi Jeff,&lt;br&gt;&lt;br&gt;Thanks for a very interesting and ...</title><content type='html'>Hi Jeff,&lt;BR/&gt;&lt;BR/&gt;Thanks for a very interesting and worthwhile post. And thanks also for your related comments at my blog (to which I replied BTW).&lt;BR/&gt;&lt;BR/&gt;These classes definitely look like placeholders to help with assembly re-writing tools (which I presume is what Spec# is, considering the Conditionals on some of the methods). &lt;BR/&gt;&lt;BR/&gt;Even if the classes were publicly accessible, they wouldn't be truly DBC because they lack two critical components of DBC: inheritable constraints and before/after comparisons that allow you to confirm that you upheld your end of the contract.&lt;BR/&gt;&lt;BR/&gt;Inheritable constraints are what's missing from the implementation I blogged about, and it's a major flaw, because you only have to override one of my methods to be freed from all the constraints I placed in my original class or interface.&lt;BR/&gt;&lt;BR/&gt;I'm still looking for a way around the 'no lambdas or generics in attributes' restriction on .NET 3.5. If you find a way round it, let me know!&lt;BR/&gt;&lt;BR/&gt;Cheers&lt;BR/&gt;&lt;BR/&gt;Andrew Matthews</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/5563934077316593999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/5563934077316593999'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1200732060000#c5563934077316593999' title=''/><author><name>Andrew Matthews</name><uri>http://aabs.wordpress.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1952858221'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-4841880830033492383</id><published>2008-01-16T20:22:00.000-05:00</published><updated>2008-01-16T20:22:00.000-05:00</updated><title type='text'>Phil: this is more or less the idea that Spec# bri...</title><content type='html'>Phil: this is more or less the idea that Spec# brings. It seems that the Eiffel folks have been doing this for years in terms of the "requires"/"ensures" pattern. &lt;BR/&gt;&lt;BR/&gt;After reading more on Design by Contract and looking at Spec#, a cool glimpse of the future came into my mind. Detecting bad parameters at compile time.&lt;BR/&gt;&lt;BR/&gt;It's not much of a leap to go from (to use your example)&lt;BR/&gt;&lt;BR/&gt;public virtual void CopyTo(Array! array, int index) {...}&lt;BR/&gt;&lt;BR/&gt;to looking at the call sites like&lt;BR/&gt;&lt;BR/&gt;al.CopyTo(null, 0)&lt;BR/&gt;&lt;BR/&gt;and throwing a &lt;I&gt;compile time&lt;/I&gt; error saying that this violates the contract. That is really cool stuff.&lt;BR/&gt;&lt;BR/&gt;You might also want to check out Wes's &lt;A HREF="http://wesnerm.blogs.com/net_undocumented/2007/10/specifications.html" REL="nofollow"&gt;support for specifications via statements embedded in comments&lt;/A&gt; in his upcoming NStatic tool.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/4841880830033492383'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/4841880830033492383'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1200532920000#c4841880830033492383' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-7176032786165792636</id><published>2008-01-16T18:42:00.000-05:00</published><updated>2008-01-16T18:42:00.000-05:00</updated><title type='text'>Interesting stuff. &lt;br&gt;&lt;br&gt;A thought occurred to m...</title><content type='html'>Interesting stuff. &lt;BR/&gt;&lt;BR/&gt;A thought occurred to me while reading through this. What if we could decorate our parameters for common scenarios such as nulls. To guard against a null reference you could use a suffix in a similar way to how ? can be used for nullable value types. &lt;BR/&gt;&lt;BR/&gt;For example, let's use an exclamation point to guard against null parameters:&lt;BR/&gt;&lt;BR/&gt;   public virtual void CopyTo(Array! array, int index) { ... &lt;BR/&gt;&lt;BR/&gt;So if array is null it would throw an exception. &lt;BR/&gt;&lt;BR/&gt;Taking this a bit further, a double exclamation could guard against null or empty strings:&lt;BR/&gt;   public virtual void Foo(String!! myString) { ... &lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;Not saying this is a good idea, just that it's interesting to think about.&lt;BR/&gt;&lt;BR/&gt;Phil</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/7176032786165792636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/7176032786165792636'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1200526920000#c7176032786165792636' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1961176217'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-6634263749437783816</id><published>2008-01-16T07:46:00.000-05:00</published><updated>2008-01-16T07:46:00.000-05:00</updated><title type='text'>tweez: Thank you very much for your comment!&lt;br&gt;&lt;b...</title><content type='html'>tweez: Thank you very much for your comment!&lt;BR/&gt;&lt;BR/&gt;I hadn't seen the link you mentioned before. It seems that the author of that one had similar goals. I like the idea of possibly adding a "Guard.ArgumentEnsure(bool condition, string paramName, Exception exceptionToThrowIfConditionFails)" with a simplified verision that just throws an ArgumentException.&lt;BR/&gt;&lt;BR/&gt;Thanks for letting me know about things not showing up well in FireFox. I manually edited the HTML to add a border around the code. I'll do a bit more searching on how to best render code. I have been using the "Copy Source as HTML" plugin, but there's probably a better way.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/6634263749437783816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/6634263749437783816'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1200487560000#c6634263749437783816' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-5472978544662453342</id><published>2008-01-16T01:39:00.000-05:00</published><updated>2008-01-16T01:39:00.000-05:00</updated><title type='text'>This is the one I'm using. It's the guard principl...</title><content type='html'>This is the one I'm using. It's the guard principle...: Design by contract.&lt;BR/&gt;http://www.codeproject.com/KB/cs/designbycontract.aspx&lt;BR/&gt;&lt;BR/&gt;ps: Your blog doesn't show correct in FF..</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/5472978544662453342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/5269196037317404084/comments/default/5472978544662453342'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html?showComment=1200465540000#c5472978544662453342' title=''/><author><name>TweeZz</name><uri>http://www.blogger.com/profile/13104362628688091418</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/borrowing-ideas-from-3-interesting.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-5269196037317404084' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/5269196037317404084' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1615702376'/></entry></feed>
