<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for How about some syntax sugar for IEnumerable&lt;&gt;? (TechOff on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/forums/techoff/447651-how-about-some-syntax-sugar-for-ienumerable/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for How about some syntax sugar for IEnumerable&lt;&gt;? (TechOff on Channel 9)</title><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/</link></image><description>How about some syntax sugar for IEnumerable?</description><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/</link><language>en-us</language><pubDate>Fri, 19 Dec 2008 19:46:27 GMT</pubDate><lastBuildDate>Fri, 19 Dec 2008 19:46:27 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>No - C# has pointers, even if you don't use them, so C# couldn't introduce Type* as a shorthand for IEnumerable&amp;lt;Type&gt; without a breaking change (and unsafe contexts are important for C# - they're used everywhere inside the .NET framework even if you can't see them).&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;You might be able to "outgrow" the notion that Type* is a pointer, but that doesn't mean everyone can.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449216</link><pubDate>Fri, 19 Dec 2008 19:45:00 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449216</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/449216/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>No - C# has pointers, even if you don't use them, so C# couldn't introduce Type* as a shorthand for IEnumerable&amp;lt;Type&gt; without a breaking change (and unsafe contexts are important for C# - they're used everywhere inside the .NET framework even if you can't see them).You might be able to "outgrow"&amp;#8230;</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/449216/Trackback.aspx</trackback:ping></item><item><title>Re: Re: How about some syntax sugar for IEnumerable?</title><description>If you're a C# developer, you quickly outgrow the "* as pointer" instinct. I haven't touched pointers in quite a while, and this is true even though I've written some C++ code lately - I've mostly used ^ managed pointers for C++/CLI. :)&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Regardless of whether you use * or any other mark that won't send C/C++ programmers into a tizzy, it has nothing to do with IEnumerable's Count method. While it's true that an IEnumerable is a lazy construct that isn't required to know at any given point in time how many elements it has in its possibly infinite sequence, there are still many (dare I say most?) scenarios where the Count is both knowable and relevant. I would rather have a Count() method that can (potentially) throw an exception or return a special value for an unknowable length, rather than disallow it entirely.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449208</link><pubDate>Fri, 19 Dec 2008 19:09:54 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449208</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/449208/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>If you're a C# developer, you quickly outgrow the "* as pointer" instinct. I haven't touched pointers in quite a while, and this is true even though I've written some C++ code lately - I've mostly used ^ managed pointers for C++/CLI. :)Regardless of whether you use * or any other mark that won't&amp;#8230;</evnet:previewtext><dc:creator>Yggdrasil</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/449208/Trackback.aspx</trackback:ping></item><item><title>Re: How about some syntax sugar for IEnumerable?</title><description>I would find Foo* very confusing if it would be used for IEnumerable&amp;lt;Foo&gt;. Foo* is a pointer and incrementing that pointer means that we move to the next element that sits nearby in memory. With IEnumerable that isn't true... there shouldn't be any Count in IEnumerable too. There's no guarantee that you can count the elements that are returned by the interface: it might be a live stream that is returned frame by frame.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449198</link><pubDate>Fri, 19 Dec 2008 18:32:01 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449198</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/449198/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I would find Foo* very confusing if it would be used for IEnumerable&amp;lt;Foo&gt;. Foo* is a pointer and incrementing that pointer means that we move to the next element that sits nearby in memory. With IEnumerable that isn't true... there shouldn't be any Count in IEnumerable too. There's no guarantee&amp;#8230;</evnet:previewtext><dc:creator>Christian Liensberger</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/449198/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>&lt;div&gt;Hehe... how much do I love these kind of arguments. It's actually rather easy to see what "int" gets resolved in C# to: type int into the C# editor. Select it. Press F12. See where you end... the same applies to bool, byte, long, short, and a lot others. just keywords to make it easier for C/C++ devs and who wants to type Int32 all the time :P or Boolean.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449197</link><pubDate>Fri, 19 Dec 2008 18:29:25 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=449197</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/449197/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Hehe... how much do I love these kind of arguments. It's actually rather easy to see what "int" gets resolved in C# to: type int into the C# editor. Select it. Press F12. See where you end... the same applies to bool, byte, long, short, and a lot others. just keywords to make it easier for C/C++&amp;#8230;</evnet:previewtext><dc:creator>Christian Liensberger</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/449197/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>The only reason I think it could be done is so that C# has the ability to describe a sequence&amp;nbsp;without reliance on .NET types... it already has this in a senses however from its GetEnumerator() pattern etc.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448860</link><pubDate>Wed, 17 Dec 2008 14:19:24 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448860</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448860/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The only reason I think it could be done is so that C# has the ability to describe a sequence&amp;nbsp;without reliance on .NET types... it already has this in a senses however from its GetEnumerator() pattern etc.</evnet:previewtext><dc:creator>stevo_</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448860/Trackback.aspx</trackback:ping></item><item><title>Re: Re: How about some syntax sugar for IEnumerable?</title><description>But like the natural evolution of spoken languages, you find that conceptts that are in heavy use often get shortened down, either 'officially' or colloquially, simply because they are in constant use and people try to optimize their communications. With LINQ, as you said, people use it a lot, and a good thing too in my opinion. That's why people will want a simpler shorthand for it rather than the relatively lengthy an verbose IEnumerable&amp;lt;T&amp;gt;.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448858</link><pubDate>Wed, 17 Dec 2008 14:11:11 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448858</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448858/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>But like the natural evolution of spoken languages, you find that conceptts that are in heavy use often get shortened down, either 'officially' or colloquially, simply because they are in constant use and people try to optimize their communications. With LINQ, as you said, people use it a lot, and a&amp;#8230;</evnet:previewtext><dc:creator>Yggdrasil</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448858/Trackback.aspx</trackback:ping></item><item><title>Re: How about some syntax sugar for IEnumerable?</title><description>Not sure I see any readability issues with IEnumerable&amp;lt;T&amp;gt;.&amp;nbsp; In fact, with linq,&amp;nbsp;many people now&amp;nbsp;come to expect it, so in that sense, people understand it right away and "get" the contract.&amp;nbsp; So it is also a pattern you don't have to reinvent.&amp;nbsp; It also gives you the ability of lazy yielding and makes that very easy, so in that respect it is already sugar.&amp;nbsp; I think finding something else just makes learning something else with another name.&amp;nbsp;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448773</link><pubDate>Wed, 17 Dec 2008 01:54:26 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448773</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448773/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Not sure I see any readability issues with IEnumerable&amp;lt;T&amp;gt;.&amp;nbsp; In fact, with linq,&amp;nbsp;many people now&amp;nbsp;come to expect it, so in that sense, people understand it right away and "get" the contract.&amp;nbsp; So it is also a pattern you don't have to reinvent.&amp;nbsp; It also gives you the&amp;#8230;</evnet:previewtext><dc:creator>William Stacey</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448773/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>&lt;blockquote&gt;&lt;div&gt;I was only making a minor point. Someone suggested that int, bool and array [] notation get special language keywords, and made the leap to assuming this was because they were someone "preferred" types, rather than for other more boring implementation reasons.&lt;/div&gt;&lt;/blockquote&gt;&lt;BR&gt;But that's my point: that's not true. There is no implementation difference between int and Int32, not at the level of the C# compiler. The CLR probably does have a separate notion of a hardware integer, but that has no relation&amp;nbsp;to the int keyword, and no relation to C# whatsoever.&amp;nbsp;The only reason they get special keywords is because that's what programmers are used to in C-like languages.&lt;BR&gt;&lt;BR&gt;I'm not trying to be argumentative or anything (although I probably sound like that), just trying to get everyone on the same page, because it just seems we're talking about different things.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448348</link><pubDate>Sat, 13 Dec 2008 15:01:45 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448348</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448348/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I was only making a minor point. Someone suggested that int, bool and array [] notation get special language keywords, and made the leap to assuming this was because they were someone "preferred" types, rather than for other more boring implementation reasons.But that's my point: that's not true.&amp;#8230;</evnet:previewtext><dc:creator>Sven Groot</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448348/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>I was only making a minor point. Someone suggested that int, bool and array [] notation get special language keywords, and made the leap to assuming this was because they were someone "preferred" types, rather than for other more boring implementation reasons.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Sometimes I feel that trying to refute or explain things by giving examples doesn't help. Perhaps next time I will just say "No, you're wrong" and leave it at that, but it feels kind of rude. I was only trying to help.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448343</link><pubDate>Sat, 13 Dec 2008 14:19:15 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448343</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448343/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I was only making a minor point. Someone suggested that int, bool and array [] notation get special language keywords, and made the leap to assuming this was because they were someone "preferred" types, rather than for other more boring implementation reasons.Sometimes I feel that trying to refute&amp;#8230;</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448343/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>&lt;blockquote&gt;&lt;div&gt;I wasn't claiming anything of the sort.&lt;/div&gt;&lt;/blockquote&gt;&lt;BR&gt;Then why did you change the subject? Everybody else was talking about C# up to that point. And as far as C# is concerned, Int32 and int and 100% identical. How that's handled internally by the CLR was never the matter at hand.&lt;BR&gt;&lt;BR&gt;From a language perspective, int and Int32 are identical. No matter which you use, if you look at the generated code in ildasm or reflector, it'll be identical. Of course at some layer the CLR has to distinguish between Int32 and an actual hardware integer. But C# does not expose that.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448332</link><pubDate>Sat, 13 Dec 2008 12:30:38 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448332</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448332/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I wasn't claiming anything of the sort.Then why did you change the subject? Everybody else was talking about C# up to that point. And as far as C# is concerned, Int32 and int and 100% identical. How that's handled internally by the CLR was never the matter at hand.From a language perspective, int&amp;#8230;</evnet:previewtext><dc:creator>Sven Groot</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448332/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>I wasn't claiming anything of the sort. While they are identical to all intents and purposes, they are not unified into a single entity because they are NOT the same in the corelib, where they are different things for the purposes of allowing the object methods on an int to be definable (Note that Java doesn't do this, so you can't have something like "4.ToString()"). My point is simply that the duplication of int and Int32 isn't quite as arbitrary as it was being made out to be - there is a reason for it, and that the argument that a duplication of syntax of IEnumerable&amp;lt;T&gt; is something they've done before for code simplicity is therefore a flawed argument.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The reason that Int32 and int are the same in all other libraries and code is because the compiler converts all cases of Int32 to int and all cases of typeof(int) to typeof(Int32), and the IDE treats both identically - since I suspect most people don't make a habit of re-engineering the corelib or building compilers, most .NET developers can happilly live thinking that Int32 and int are identically equivilent.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448321</link><pubDate>Sat, 13 Dec 2008 10:53:41 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448321</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448321/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I wasn't claiming anything of the sort. While they are identical to all intents and purposes, they are not unified into a single entity because they are NOT the same in the corelib, where they are different things for the purposes of allowing the object methods on an int to be definable (Note that&amp;#8230;</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448321/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>Gah, now you've gotten me stumped, looking through the CIL docs trying to figure out what the frack they're doing there (where int32 is a member of System.Int32, and they're both value types).  int32 is supposed to directly map to System.Int32 in CIL, too, so it shouldn't be possible for it to be a member of itself.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;There must be a good explanation...&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448299</link><pubDate>Sat, 13 Dec 2008 06:39:42 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448299</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448299/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Gah, now you've gotten me stumped, looking through the CIL docs trying to figure out what the frack they're doing there (where int32 is a member of System.Int32, and they're both value types).  int32 is supposed to directly map to System.Int32 in CIL, too, so it shouldn't be possible for it to be a&amp;#8230;</evnet:previewtext><dc:creator>JonathonW</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448299/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>The underlying implementation is not the issue. You were&amp;nbsp;saying that they are different from a C# language perspective, which they're not. Whether you use Int32 or int doesn't matter, it generates identical IL.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448292</link><pubDate>Sat, 13 Dec 2008 03:40:04 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448292</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448292/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The underlying implementation is not the issue. You were&amp;nbsp;saying that they are different from a C# language perspective, which they're not. Whether you use Int32 or int doesn't matter, it generates identical IL.</evnet:previewtext><dc:creator>Sven Groot</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448292/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>I would accept an alias like “ien” for IEnumerable.&amp;nbsp; However, since readability is a matter of personal preference then maybe a C++ macro&amp;nbsp;definition is what is really called for. After all, there’s quite a few lengthy type names that could fall into the same category.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448228</link><pubDate>Fri, 12 Dec 2008 21:11:40 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448228</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448228/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I would accept an alias like “ien” for IEnumerable.&amp;nbsp; However, since readability is a matter of personal preference then maybe a C++ macro&amp;nbsp;definition is what is really called for. After all, there’s quite a few lengthy type names that could fall into the same category.</evnet:previewtext><dc:creator>Chris Walker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448228/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>Except in the Core Library (mscorlib), where an Int32 is a struct that contains an int and exposes object methods; whereas int is just the pure numeric type. Int32 is a struct that contains an int field; something that would not be allowed normally since a structure can't recursively contain fields on itself.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448211</link><pubDate>Fri, 12 Dec 2008 19:10:38 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448211</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448211/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Except in the Core Library (mscorlib), where an Int32 is a struct that contains an int and exposes object methods; whereas int is just the pure numeric type. Int32 is a struct that contains an int field; something that would not be allowed normally since a structure can't recursively contain fields on itself.</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448211/Trackback.aspx</trackback:ping></item><item><title>Re: How about some syntax sugar for IEnumerable?</title><description>The way I was always told is that int, bool string etc in C# are there so that technically the C# language could be made to sit on top of something that wasn't nec~ .NET.. same reasons why C# looks for GetEnumerator, and expects only certain methods / properties to exist on the returned object (various other things like that).. it doesn't (or at least isn't&amp;nbsp;suposed to) have any specific knowledge of .NET types.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448181</link><pubDate>Fri, 12 Dec 2008 15:51:55 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448181</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448181/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The way I was always told is that int, bool string etc in C# are there so that technically the C# language could be made to sit on top of something that wasn't nec~ .NET.. same reasons why C# looks for GetEnumerator, and expects only certain methods / properties to exist on the returned object&amp;#8230;</evnet:previewtext><dc:creator>stevo_</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448181/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>Correct, as Sven mentioned in C# int is just an alias for Int32. You can spell it either way you wish. Under the covers int is an Int32.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448170</link><pubDate>Fri, 12 Dec 2008 14:39:04 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448170</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448170/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Correct, as Sven mentioned in C# int is just an alias for Int32. You can spell it either way you wish. Under the covers int is an Int32.</evnet:previewtext><dc:creator>Curt Nichols</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448170/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>&lt;P&gt;I always assumed that&amp;nbsp;Int32/int swapping is identical to Object/object and String/string, i.e. just an alias that the compiler resolves to the same thing.&amp;nbsp;When the compiler encounters an "int a = 5" call, doesn't it&amp;nbsp;translate it to an an Int32 and then assigns the value to the _value field?&lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448167</link><pubDate>Fri, 12 Dec 2008 14:22:38 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448167</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448167/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I always assumed that&amp;nbsp;Int32/int swapping is identical to Object/object and String/string, i.e. just an alias that the compiler resolves to the same thing.&amp;nbsp;When the compiler encounters an "int a = 5" call, doesn't it&amp;nbsp;translate it to an an Int32 and then assigns the value to the _value field?</evnet:previewtext><dc:creator>Yggdrasil</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448167/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>&lt;blockquote&gt;&lt;div&gt;int and Int32 are nessisarilly different (this is to do with the fact that int is a primitive that supports basic operations, whereas Int32 is a primitive structure that supports all of the .-methods&lt;/div&gt;&lt;/blockquote&gt;&lt;BR&gt;That is true in Java, but not in C#; in C#, "int" is an alias for System.Int32, nothing more.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448165</link><pubDate>Fri, 12 Dec 2008 14:18:17 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448165</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448165/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>int and Int32 are nessisarilly different (this is to do with the fact that int is a primitive that supports basic operations, whereas Int32 is a primitive structure that supports all of the .-methodsThat is true in Java, but not in C#; in C#, "int" is an alias for System.Int32, nothing more.</evnet:previewtext><dc:creator>Sven Groot</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448165/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>There's good reason for the examples you give ( arrays, int versus Int32 ) that are systemmic and to do with how the CLR and C# actually operate in terms of low level mechanics, so while what you say is certainly true, IEnumerable&amp;lt;T&gt; _can_ exist on its own - int and Int32 are nessisarilly different (this is to do with the fact that int is a primitive that supports basic operations, whereas Int32 is a primitive structure that supports all of the .-methods. The compiler is happy to swap between them, but the struct Int32 contains an (int _value) field, and arrays need special dispensation from the Garbage Collector and special creation semantics at the runtime.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;That's not to say that your idea isn't good - it's just to say that IEnumeable&amp;lt;T&gt; doesn't HAVE to have a new keyword, wheras int and arrays DO.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448162</link><pubDate>Fri, 12 Dec 2008 14:00:58 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=448162</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/448162/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>There's good reason for the examples you give ( arrays, int versus Int32 ) that are systemmic and to do with how the CLR and C# actually operate in terms of low level mechanics, so while what you say is certainly true, IEnumerable&amp;lt;T&gt; _can_ exist on its own - int and Int32 are nessisarilly&amp;#8230;</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/448162/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Re: How about some syntax sugar for IEnumerable?</title><description>&lt;P&gt;Auto-expanding &lt;EM&gt;var&lt;/EM&gt; might aid writing, but not reading. Heavily nested generics are hard to read, for me - but I'm not arguing that var can be even harder to parse. We decided to enforce as a coding standard at&amp;nbsp; using &lt;EM&gt;var&lt;/EM&gt; only when the full, specific and concrete type name is specified on the same line (i.e. var dict = new Dictionary&amp;lt;int, string&amp;gt;). If we initialize an object from a method, factory or anything else, we specify the full type name.&lt;BR&gt;&lt;BR&gt;Regarding your second point - when you start relying on LINQ a lot, IEnumerable&amp;lt;T&amp;gt; becomes a de-facto language keyword. Just like &lt;EM&gt;int&lt;/EM&gt; and &lt;EM&gt;bool&lt;/EM&gt; are defined as language keywords for the oh-so-common Int32 and Boolean, to name a few. Or, to be even more similar, the [] array specifier.&lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447962</link><pubDate>Wed, 10 Dec 2008 15:47:31 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447962</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/447962/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Auto-expanding var might aid writing, but not reading. Heavily nested generics are hard to read, for me - but I'm not arguing that var can be even harder to parse. We decided to enforce as a coding standard at&amp;nbsp; using var only when the full, specific and concrete type name is specified on the&amp;#8230;</evnet:previewtext><dc:creator>Yggdrasil</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/447962/Trackback.aspx</trackback:ping></item><item><title>Re: How about some syntax sugar for IEnumerable?</title><description>Yes we all know this, but clearly what everyone is talking about here is having immutable interfaces as a step in the middle of IEnumerable and IWhateverMutableDataStructure...&lt;BR&gt;&lt;BR&gt;I'm still trying to understand why thats so hard to grasp.. nobody is wanting to corrupt what IEnumerable is.. we just want interfaces that describe the readonly actions of the common data structures that .NET has.. this is something I'm sure most people here have thought about even years ago.. I was thinking this time last year that I would love an immutable collection / dictionary interface.. and then wondering why they don't exist.. the great thing about the interface over the concrete type say.. ReadOnlyCollection.. is:&lt;BR&gt;&lt;BR&gt;- Allows complete variance on implementation&lt;BR&gt;- Allows you to expose the instance as either readonly or mutable in a cleaner way (vs keeping a reference to the underlying Collection that ReadOnlyCollection wraps)..</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447959</link><pubDate>Wed, 10 Dec 2008 15:33:34 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447959</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/447959/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Yes we all know this, but clearly what everyone is talking about here is having immutable interfaces as a step in the middle of IEnumerable and IWhateverMutableDataStructure...I'm still trying to understand why thats so hard to grasp.. nobody is wanting to corrupt what IEnumerable is.. we just want&amp;#8230;</evnet:previewtext><dc:creator>stevo_</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/447959/Trackback.aspx</trackback:ping></item><item><title>Re: Re: How about some syntax sugar for IEnumerable?</title><description>I would prefer the IDE to auto-expand out my "var" keywords to what they really are when I give it a shortcut key - this would allow you to just write&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;var myFoo = select ... &amp;lt;Tab&gt; &amp;lt;Tab&gt; &amp;lt;ShortCutKey&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;IEnumerable&amp;lt;ICollection&amp;lt;Structure&amp;lt;MyFoo&amp;lt;Dictionary&amp;lt;Gets&amp;lt;Quite&amp;lt;Long&gt;, Doesnt&gt; It&gt;&gt;...&gt;&gt; myFoo = select ...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Actually adding keywords dilutes the language and makes it harder to read.&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447956</link><pubDate>Wed, 10 Dec 2008 15:28:48 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447956</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/447956/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I would prefer the IDE to auto-expand out my "var" keywords to what they really are when I give it a shortcut key - this would allow you to just writevar myFoo = select ... &amp;lt;Tab&gt; &amp;lt;Tab&gt; &amp;lt;ShortCutKey&gt;IEnumerable&amp;lt;ICollection&amp;lt;Structure&amp;lt;MyFoo&amp;lt;Dictionary&amp;lt;Gets&amp;lt;Quite&amp;lt;Long&gt;,&amp;#8230;</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/447956/Trackback.aspx</trackback:ping></item><item><title>Re: Re: How about some syntax sugar for IEnumerable?</title><description>IEnumerable&amp;lt;T&gt; has no direct methods for mutating a collection, so unless you use reflection or do an upwards cast then an IEnumerable&amp;lt;T&gt; is immutable.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If you want to be really sure, then do this:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class {&lt;br&gt;  List&amp;lt;foo&gt; myMutableCollection = new List&amp;lt;foo&gt;();&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;  public IEnumerable&amp;lt;foo&gt; EnumerableFoo {&lt;br&gt;    get {&lt;br&gt;       return new ReadOnlyCollection(myMutableCollection);&lt;br&gt;    }&lt;br&gt;  } &lt;br&gt;}&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;and now the mutablecollection can only be altered by the class or by reflection (and there's not much you can do to prevent reflection doing bad things)&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447955</link><pubDate>Wed, 10 Dec 2008 15:25:59 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447955</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/447955/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>IEnumerable&amp;lt;T&gt; has no direct methods for mutating a collection, so unless you use reflection or do an upwards cast then an IEnumerable&amp;lt;T&gt; is immutable.If you want to be really sure, then do this:class {  List&amp;lt;foo&gt; myMutableCollection = new List&amp;lt;foo&gt;();  public IEnumerable&amp;lt;foo&gt;&amp;#8230;</evnet:previewtext><dc:creator>evildictaitor</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/447955/Trackback.aspx</trackback:ping></item><item><title>Re: How about some syntax sugar for IEnumerable?</title><description>To get back to the original topic - I'm all for the proposed syntax change. When you start using LINQ a lot, passing IEnumerable&amp;lt;T&gt;s back and forth, you start hating how long it is - not to write, since we have autocomplete intellisense for that, but to read. It fills up the code with useless letters. &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I second the * syntax, though that would cause problems with unsafe code. A coworker of mine wants to just tack the plural 's' onto it, so an IEnumerable&amp;lt;string&gt; would just be strings. Of course, that would mean that an IEnumerable&amp;lt;Bus&gt;, for instance, would have to be correctly parsed by the compiler from Buses. And that's before we even make the compiler understand the shorthand for IEnumerable&amp;lt;Mouse&gt;...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447924</link><pubDate>Wed, 10 Dec 2008 08:30:05 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/447651-How-about-some-syntax-sugar-for-IEnumerable/?CommentID=447924</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/447924/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>To get back to the original topic - I'm all for the proposed syntax change. When you start using LINQ a lot, passing IEnumerable&amp;lt;T&gt;s back and forth, you start hating how long it is - not to write, since we have autocomplete intellisense for that, but to read. It fills up the code with useless&amp;#8230;</evnet:previewtext><dc:creator>Yggdrasil</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/447924/Trackback.aspx</trackback:ping></item></channel></rss>