Is LINQ a copy of Hibernate? Part 2

In response to my previous post, Lilly made some good comments. Here are a couple of them "Generilization is good in a way.  But it never optimizes for performance", "Declarative type of programming?  O, man.  Are they planning to turn the developers to robots?" Grin. Microsoft has a bigger goal than turning developers into Robots. Today when you write a program you instruct the compiler line by line the entire program. In short you tell the compiler how you want to accomplish rather than what. In SQL Server (true for all RDBMS) you never tell the SQL compiler how you want it to fetch data, you tell it what you want. That is exactly what Microsoft is trying to achieve with .NET 3.5.

By abstracting / generalizing the how from the programmer, the compiler will be able to make smart decisions on the most optimum way to get the desired results (just like SQL Server does). It is never fool proof and hence we will need some sort of a hinting mechanism (again just like SQL Server) for better performance.

In the end the biggest gain by abstraction is that when you run the same program on machines that have 2, 4 or 10 core processors (near future) the compiler can generate the how part of your code such that the CLR can divide the task and run the sub-tasks on different cores, merge the results from the sub-tasks into one result and return it to the program. This would lead to faster executions and hence better performance.

.NET 3.5 is the first step in this direction, Microsoft has a research project going on for almost a year now on PLINQ (Parallel Language INtegrated Query). I think we will see the fruits of this project in the next 2-5 years. Until then we can only feel dumb as more and more code gets auto-generated leaving less and less work for the developers. Look at the positive side, if we were still writing assembly code we wouldn't have been come so far in the computing world.


1 Response

Re: Is LINQ a copy of Hibernate? Part 2

In Sql Server we trust, I temporarily buy in your theory, hehe.

Seriously, Sql Server is one my most favorite MS products.  It makes it possible that database can be easy.  It also provides good tools to analyze and optimize.  That said, I will temporarily trust what MS is heading to.

I agree with you that it's better to leave big yet static tasks such as load balance, transaction, distributed system to designate groups to handle.  MS is doing it, so as the Java world.

But I still won't like to have all my programming work declaratively.  If that's the way to be, I will probably leave the IT world.  After all, I am coding for fun.



- Lilly   February 05, 2007 08:15 PM

Leave a Reply

Please enter all required information

*

*

*