Friday, January 19, 2007

Codemash - what i got out of it

In several sessions I have heard speakers talking about of what we are getting without knowing how to get concept. I feel there is a trend to abstract/simplify programming, we are getting tools that will allow us to concentrate on getting WHAT we need, and letting underlying framework to figure on HOW to fulfil the request.

This will allow us to take advantage of the hardware (multi-cores) and framework changes.

For example, if we need to loop through the list of cities and do something with result(s), if we use 'for', we are stucked with a single thread.

foreach (City city in cities)
if (city.Name == "Columbus")
whatever

but if we use LINQ, even though it does not use multi-threading right now, he are not programming on HOW we are getting the data, which leaves framework for the future evolution to make a smart decision on how to get those cities for us:
var results = from city in cities
where city.Name =="Columbus"
select city;

No comments: