﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Luke Breuer commented on On Syntactic Sugar and Weight</title><description>It is interesting that you mention this.  Aren't anonymous types just slightly stronger than dynamic languages, in the sense that, if you use my cheating method, the "receiving" method has to explicitly specify what it expects to get (CastExact) or the minimum requirements (CastPartial)?  I could even add a CastOrDefault, which would just set properties to default(T) if they aren't found in the passed object.
  
  
The more I think about it, the more it seems we need to go this cheating route to see how it is used, then, possibly, suggest a syntax for this to Microsoft.  What do you think?
</description><link>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment5</link><guid>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment5</guid><pubDate>Thu, 14 Feb 2008 14:11:56 GMT</pubDate></item><item><title>Ayende Rahien commented on On Syntactic Sugar and Weight</title><description>God methods are methods that are very very long.
  
Taking more responsibilities than they should.
  
It is an anti pattern.
  
  
I am not exactly fond of cheating.
  
Yes, it is a nice hack, but that is not somethign that recommends it to me.
</description><link>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment4</link><guid>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment4</guid><pubDate>Wed, 13 Feb 2008 22:03:59 GMT</pubDate></item><item><title>Luke Breuer commented on On Syntactic Sugar and Weight</title><description>Can you elaborate on the god method thing?  Also, you can cheat with anonymous types, and after reflecting on this code, it might not be _that_ bad: http://luke.breuer.com/time/item/C_30_Anonymous_Cheating/264.aspx
</description><link>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment3</link><guid>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment3</guid><pubDate>Wed, 13 Feb 2008 21:41:21 GMT</pubDate></item><item><title>Ayende Rahien commented on On Syntactic Sugar and Weight</title><description>Anonymous types are bad because they are locally scoped.
  
I would really like a quicker way to define a named typed. But this idea of anonymous types is bad because it encourages god methods.
</description><link>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment2</link><guid>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment2</guid><pubDate>Wed, 13 Feb 2008 20:57:55 GMT</pubDate></item><item><title>Luke Breuer commented on On Syntactic Sugar and Weight</title><description>It's interesting you say this, but don't like anonymous types.  Or have I mis-characterized your opinion of anonymous types by making this connection?
</description><link>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment1</link><guid>http://ayende.com/3132/on-syntactic-sugar-and-weight#comment1</guid><pubDate>Wed, 13 Feb 2008 20:55:13 GMT</pubDate></item></channel></rss>