Clarifying my comments on Previous Post
My last post generated valid criticisms from readers. Let’s clarify and correct that.
Keith Elder commented:
I got the impression reading your post that you "skimmed" my article and didn't really get what it was I was getting at.
[…]
The whole point of this is C# 3.0 can be written where it is unreadable (lambda as an example) but it can also make the code 200% more readable than the old way by combining several features, not just one.
Although you say you disagree, I know we both agree because we both agree the LINQ example is the most readable. Hugs all around :)
Fair enough. The title of Keith’s post certainly led me to conclude that his point was that the new syntax made for less readable code. Not his intent, and clearly my fault. My apologies for misinterpreting your intent.
Sean comments:
On the "don't use it just to use it" idea, I admit that just throwing something in can be reckless, how can you know when to use it if you don't blatantly experiment with it?
I would advocate ‘blatantly experimenting with it’. It’s a great way to learn where new features can help, and when you’ll run into weaknesses with that new feature.
But…
Before declaring a task done, take a moment and do your own review of the code. In this sense, much like Keith explored multiple solutions in his blog post, look at alternatives, determine which is the most readable, and maintainable, and go with it.
Another important technique to learn new techniques is reading code. Scott Hanselman’s “Weekly Source Code” series is great example of how to do that.