Reactions to story from Omer van Kloeten's .NET Zen
A Limitation of Lambda Expressions and Overloaded Extension Methods
http://weblogs.asp.net/ okloeten/ archive/ 2008/ 05/ 07/ 6165335.aspx
Tamir hates lambdas. He was having a problem with one of his lambda expressions and twittered about it. Around that time I opened my twitter account (yes, Yosi finally convinced me) and offered my help. He wanted to have a single extension method that could iterate over a collection and either change or keep the values it got. Kind of like this:items.ForEach(item => item.SubItems.ForEach(subItem => subItem = newValue)); Where ForEach was defined as:static void ForEach<T>(this IList<T> collection, Action<T> action) { for (int i = 0; i < collection.Count; i++) {
Reactions / posts that link to this post
-
Dew Drop - May 8, 2008
http://www.alvinashcraft.com/2008/05/08/dew-drop-may-8-2008/Web Development Why You Should Wrap Your ASP.NET Session Object (Shahar Abramovich) New Release of SmartTools for SharePoint (Jan Tielens) Miscellaneous 3 Places to Keep Your Pocket Code (Besides Your Pocket) (Max Pool) Day-to-Day with Subversion (Bil Simser) - Link of the Day 35 Useful Source Code Editors Reviewed (Vitaly Friedman & Sven Lennartz) Messenger TV Is Coming Soon (Sunshine) Xobni Acquires IP From Failed Web 1.0 Startup FireDrop (Michael Arrington) OpenOffice.org 3.0 Beta Announcement (OOO Marketing) Halo, Office 2007, Safari Now on U3 (With the Help of One Man) (Everything USB) iRex’s iLiad Book Edition e-book Reader (John Brownlee) Amazon Kindle on the Road (Rick Strahl) How to Make Late Software Even Later (Casey Charlton) Social Networks/Blogging and Self-Improvement (Rhonda Tipton) Intwition Shows You Who’s Tweeting About Your Blog (Brad Linder) Service Pass-Through in Neuron ESB (David Pallmann) .NET A Limitation of Lambda Expressions and Overloaded Extension Methods (Omer van Kloeten) Covariance and Contravariance, Part Eleven: To Infinity, but Not Beyond (Eric Lippert) Do You Really Need a Data Access Layer with LINQ? (Jason Young) Introducing Machine.Specifications (or MSpec for Short) (Aaron Jensen) Exception Handling - Do’s and Don’ts (Misbah Arefin) Building an F# Powered Indexing System (Kurt) A .NET Cryptography Primer, Part Four (Will McGurk) Silverlight / WPF / Popfly The Silverlight Tutorials & Book & More and Dynamically Creating and Destroying Containers and Dynamically Creating User Controls That Fire Events Back to You (Jesse Liberty) WPF For Line of Business Applications (Marc) Silverlight, WCF and LINQ to SQL (John Papa) Capping Your Actor’s Speed (Ben Anderson) Creating a Computer Game with My Granddaughter (Michael Leonard) Prism vs Framework XXX (Glenn Block) Great Silverlight 2 Demo: Healthcare Demonstrator (Tim Sneath) Popfly Game Creator: Video Walk-Thru (Jason Flynn) Visual Studio Unescape My Strings (Sergio Pereira) Announcing: XNA Game Studio 3.0 Community Technology Preview (CTP) (David Weller) Using Database Projects for Visual Studio (Ira) Events / Community Our .NET Community (Julie Lerman) SQL Server Should SQL Server Have the CREATE [OR REPLACE] PROCEDURE Syntax? (Denis Gobo) What’s the Difference in a GDR, a Cumulative Update, and a Service Pack? (Joe Webb) How to Rename Database Objects to Comply with Naming Conventions (Pinal Dave) Link-O-Rama Daily Find #64 (Tim Boland) Links Today (2008-05-07) (Matt Hinze) Silverlight Cream for May 07, 2008 — #269 (Dave Campbell) LINKBLOG for May 7 2008 (Arjan Zuidhof) Interesting Finds: May 7, 2008 (Jason Haley) Links (5/7/2008) (Steve Pietrek) The Morning Brew #89 (Chris Alcock) New and Notable 239 (Sam Gentile) Book of the Day Improving Web Application Security: Threats and Countermeasures: Microsoft Corporation: Books Technorati: .net development, sharepoint, sql server, silverlight, microsoft cui, wpf, popfly game creator, wcf, linq, neuron 2.0, f#, twitter
-
The Morning Brew #89
http://blog.cwa.me.uk/2008/05/08/the-morning-brew-89/Last night I attended an interesting event on Domain Driven Design, organised by the nice folks from ThoughtWorks’s new Manchester office. This was the second of these events (I missed the first), but based on last night I will be attending again. Information Comments in Code Indicate Functions Trying To Escape - Steven Smith discusses cases where you have a small comment explaining what a chunk of code does, and questions if this should really be a function in its own right. Day-to-day with Subversion - Bil Simser gives the indepth details of day-to-day life with Subversion, covering all the common activities you perform with source code control. A Limitation of Lambda Expressions and Overloaded Extension Methods - Omer van Kloeten highlights a limitation of Lambda expressions (no ref parameters), and shows how overloaded extension methods can work AddIn Enabled Applications - Sacha Barber gives a great introduction into the new System.Addin functionality, with plenty of code to illustrate. Decorating Your Domain Entities - Joel Ross looks at the use of attributes in domain entities by IOC containers, and questions if this is something that is ‘the right way’ of doing things Unescape my Strings - Sergio Pereira shows a neat use of a macro to help make it possible to see unescaped strings more easily ASP.NET 3.5 Extensions… What are the new features anyway? How can I get started? - Carlos Figueroa gathers together the downloads and support forums for the ASP.NET 3.5 Extenions Workflow Foundation 101 - Maurice de Beijer gives an introductory overview of Windows Workflow Foundation, with examples in VB.NET A .NET Cryptography Primer, Part Four - Will @ Slate Street Gang complete his series on cryptography with a look at asymmetric encryption, and specific code for RSA encryption MethodBase Without Reflection - Adam Buenz shows an alternative technique for getting at the methodbase by using stack frames. I question if this is actually reflection free - I suspect stack frame is making use of reflection - but it does illustrate the useful functionality of the stackframe. Loading a complex object graph - Gabriel Schenker looks at using NHibernate to load a complex object graph from an access database, and shows some tricks to reduce the number of queries being issued
More rising blog posts
More rising news stories
-
Entertainment »
New Sites Make It Easier to Spy on Friends -
Business »
Carlyle to Invest in China Province -
Lifestyle »
Newsweek: Organic food sales hurt by rising prices -
Politics »
Cuomo pushes Clinton-Obama joint ticket -
Sports »
Bristol City reach play-off final -
Technology »
Craigslist sues eBay, alleges corporate spy plan
Recent posts from Omer van Kloeten's .NET Zen
-
Linq to SQL: ChangeConflictException With "WHERE 0 = 1"
15 days ago -
Linq: FirstOrFallback
20 days ago -
Linq Extensions Release 2 Now on CodePlex
20 days ago