﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>wihil commented on Why I hate implementing Linq</title><description>lazy bastards
  
just use sql
  
  
linq causes more problems than it solves
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment16</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment16</guid><pubDate>Wed, 01 Dec 2010 10:04:21 GMT</pubDate></item><item><title>neo commented on Why I hate implementing Linq</title><description>all i can say keep up good work 
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment15</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment15</guid><pubDate>Thu, 11 Nov 2010 12:56:50 GMT</pubDate></item><item><title>Stefan Wenig commented on Why I hate implementing Linq</title><description>@contextfree not quite. in the case of SQL and similar target systems, it needs to translate from one high-level declarative language to another. so whenever things are different you have to step back and ask yourself, how would I tell the target system to solve this problem in its own language? (a compiler would rather have to emit the code that actually solves the problem)
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment14</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment14</guid><pubDate>Fri, 29 Oct 2010 05:24:51 GMT</pubDate></item><item><title>contextfree commented on Why I hate implementing Linq</title><description>Doesn't implementing a LINQ provider essentially amount to writing a compiler of sorts? So no wonder it's difficult.
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment13</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment13</guid><pubDate>Thu, 28 Oct 2010 22:02:04 GMT</pubDate></item><item><title>Anders commented on Why I hate implementing Linq</title><description>Checkout LINQ, Take Two – Realizing the LINQ to Everything Dream from 30 mins
  
  
[player.microsoftpdc.com/.../bfa72307-6534-41ad-...](http://player.microsoftpdc.com/Session/bfa72307-6534-41ad-bcf7-0f4fb9280515)</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment12</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment12</guid><pubDate>Thu, 28 Oct 2010 21:04:01 GMT</pubDate></item><item><title>Stefan Wenig commented on Why I hate implementing Linq</title><description>@Frans: it depends. The re-linq front-end is target-language agnostic. The remaining problem is the huge difference between LINQ and SQL, and re-linq's front-end can't possibly take this into account.
  
  
OTOH, the new back-end specifically transforms to SQL, and solves exactly these problems. We're always considering moving stuff from back- to front-end, so that non-SQL providers would be able to use it too. But most of the time, it's really just SQL-specific.
  
  
A provider that translates to XQuery would have to solve very different problems. Even a SQL-inspired language like HQL is too different to actually share a significant amount of code between SQL and HQL providers. (If someone does have good ideas: always welcome at 
[http://groups.google.com/group/re-motion-users](http://groups.google.com/group/re-motion-users)!)
  
  
You say that MS probably never will release a smooth layer for provider makers. What would you expect from such a layer that re-linq is missing?
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment11</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment11</guid><pubDate>Thu, 28 Oct 2010 14:26:06 GMT</pubDate></item><item><title>Stefan Wenig commented on Why I hate implementing Linq</title><description>@Ayende: can I use this as a testimonial? ;-)
  
Also, I might decide to steal the two-face metaphor on occation if you don't object!
  
  
Typo above: "[not LINQ, but] re-linq by itself doesn't magically remove the impedance mismatch, it just moves it to the infrastructure layer."
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment10</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment10</guid><pubDate>Thu, 28 Oct 2010 14:10:30 GMT</pubDate></item><item><title>Frans Bouma commented on Why I hate implementing Linq</title><description>Writing a linq provider is what, I think it was Kathleen Dollard, describes as "Survival Programming", and I really like that term: you constantly struggle to stay alive and keep things working, but there's always a query just around the corner which will prove your work and time weren't enough and it falls apart. Even when you know that knowledge.
  
  
I have no illusion about whether MS will ever release a layer where things are easier for linq provider writers, when looking at the command tree stuff they pass to an ef provider: it's the same hell, and _every_ provider writer has to re-do it all over again, instead of filling in blanks (as SQL is, you know, actually pretty similar looking across all databases)
  
  
re-linq helps, but it's far from a turn-key framework where you just fill in the blanks and you're on your way: the hard stuff is still on your plate, however things like keeping track of what sources were referenced for example are taken care of (as well as other preprocessor stuff) which are extremely handy and a big time saver.
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment9</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment9</guid><pubDate>Thu, 28 Oct 2010 14:06:42 GMT</pubDate></item><item><title>Ayende Rahien commented on Why I hate implementing Linq</title><description>@scooletz
  
  
As someone who tried to do a linq provider without re-linq, I can tell you that the difference is between giving up entirely and being able to provide a production ready, fully functional linq provider.
  
  
Linq is simply complex, incredibly complex.
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment8</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment8</guid><pubDate>Thu, 28 Oct 2010 08:43:17 GMT</pubDate></item><item><title>Stefan Wenig commented on Why I hate implementing Linq</title><description>It actually is a silver bullet. you just need to adapt your requirements ;-)
  
  
re-linq (part of the re-motion project, but stripped of any dependencies by now) solves the problems that the inner workings of LINQ (namely, the transformed IQueryable expression tree) introduces. It cannot solve the impedance mismatch between the LINQ language and the target language, which leaves a lot to be done. (Unless the target language is SQL, which we built a backend for that's soon going to be released. It's in SVN already.)
  
  
Let me put it this way: re-linq makes it as easy as it can be, as it should have been from the start, and as you should be able to expect. You get to a working solution quick, and can then more powerful transformations one by one. But some things just don't translate easily, such as group-by in the case of SQL.
  
  
I guess you really have to dive deep into the atrocities that IQueryable offers to really appreciate what re-linq does for you ;-)
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment7</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment7</guid><pubDate>Thu, 28 Oct 2010 08:35:36 GMT</pubDate></item><item><title>Frank commented on Why I hate implementing Linq</title><description>I really like the picture you uploaded. It shows two-faced nature of linq. Well done!
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment6</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment6</guid><pubDate>Thu, 28 Oct 2010 08:24:38 GMT</pubDate></item><item><title>scooletz commented on Why I hate implementing Linq</title><description>@Stefan Wenig,
  
I didn't make myself clear: "I thought that remotion is a silver bullet" - that more precisely describes what my imagination of remotion was:) I did like the 'who operates under normal time constraints' part :P
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment5</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment5</guid><pubDate>Wed, 27 Oct 2010 19:01:23 GMT</pubDate></item><item><title>Dominic Pettifer commented on Why I hate implementing Linq</title><description>I've often complained about NHibernate 3.0's LINQ provider being lacking compared to LINQ 2 SQL or EF, but reading about the complexity of implementing a LINQ provider, I can see why. All I can say is keep up the good work guys.
  
  
PS: Just noticed NHibernate 3.0 Beta 1 is out, when did that happen?
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment4</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment4</guid><pubDate>Wed, 27 Oct 2010 15:11:12 GMT</pubDate></item><item><title>Stefan Wenig commented on Why I hate implementing Linq</title><description>@scooletz here's a list of what re-linq does: 
[http://relinq.codeplex.com/](http://relinq.codeplex.com/)  
  
if you have to do all of that too, the problem goes from hard to impossible fast for anybody who operates under normal time constraints... but it's not a piece of cake with re-linq either. it's hard enough to figure out what kind of translation exactly you want, and you need to implement it too ;-) 
  
What Ayende describes here is a minor inconvenience compared to the kinds of things you have to solve when translating from a powerful, orthogonal language like LINQ to the mess that SQL sometimes is. (I guess HQL is closer to LINQ that way, which makes it easier for NH.)
  
  
LINQ by itself doesn't magically remove the impedance mismatch, it just moves it to the infrastructure layer. and solving problems generically is always more difficult.
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment3</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment3</guid><pubDate>Wed, 27 Oct 2010 13:53:47 GMT</pubDate></item><item><title>scooletz commented on Why I hate implementing Linq</title><description>I thought that remotion does a lot of things, but as I see there are still some nasty implementations behind LINQ provider.
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment2</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment2</guid><pubDate>Wed, 27 Oct 2010 12:34:04 GMT</pubDate></item><item><title>Stefan Wenig commented on Why I hate implementing Linq</title><description>Glad you like re-linq!
  
  
We tried to remove every kind of complexity that is not inherent in the differences between LINQ and the target language. But there's always something more you can do, we're open to suggestions or contributions here. Adding provider-specific hints like caching or eager fetching might be an area where we can improve the experience even more.
  
  
But at the end of the day, a fully featured transformation from LINQ to anything that is not LINQ will always be a lot of work. We're just glad we reduced it from insanely difficult to very difficult ;-)
</description><link>http://ayende.com/4675/why-i-hate-implementing-linq#comment1</link><guid>http://ayende.com/4675/why-i-hate-implementing-linq#comment1</guid><pubDate>Wed, 27 Oct 2010 11:32:43 GMT</pubDate></item></channel></rss>