Hacker News new | ask | show | jobs
by shaunxcode 5788 days ago
But can the sql be made to work w/ a non-sql storage engine? The lisp code facilitates this abstraction while raw sql is just that.
1 comments

That's not sql ... that's Linq from .NET. You can query with it whatever you want: in-memory data-structures, DB, Xml, LDAP.

Here's a MongoDB provider that has basic Linq support: http://github.com/samus/mongodb-csharp

Of course, the actual syntax of LINQ is baked in the compiler's rules, and you can't invent new syntax in the way LISP lets you to.

But why is that have to be the case? There's nothing stopping a compiler from being extensible, other than hard-work. I played with Boo for a month ... it comes very close to that. Perl6 also lets you do it, but it remains to be seen how good it is.

touche, I should have studied your examples longer as the second one it is clearly not straight sql. I have always been a bit jealous of linq and I agree there should be a language which allows the compiler to be extended. Smalltalk allows this to some degree particularly the research done by SCG: http://scg.unibe.ch/research/helvetia/examples