tags:

views:

1872

answers:

8

Are there any Platform agnostic (not CLI) movements to get LINQ going for C++ in some fashion?

I mean a great part of server frameworks around the world run on flavors of UNIX and having access to LINQ for C++ on UNIX would probably make lots of people happy!

+3  A: 

I know C# and C++ aren't the same, but there is the Mono project which (as of Version 2.0) supports C# 3.0 including LINQ.

http://www.mono-project.com/Main_Page

Anthony Potts
Not C++, but it's nice to know MONO supports LINQ :)
Robert Gould
I thought so, the Mono project has really grown in the last year or so. I just thought that if you were mainly interested in doing LINQ on some flavor of UNIX, this would be the route to go instead of waiting for something that might never come.
Anthony Potts
+3  A: 

I don't think C++ has the compiler sugar to handle things such as lamda expressions, so no, thats not going to happen.

FlySwat
C++ 0X has lambda, so it should be theoretically possible, but yes it's not an easy task.
Robert Gould
Now that you mentioned that and got me thinking, another option I can imagine is to go the QT route, and use a pre-compiler to add the syntactic sugar to C++, that might be a good alternative
Robert Gould
The Boost.Phoenix Library also adds Lambdas to C++ without any pre-compiler tricks. See http://tinyurl.com/d4y9se [boost.org]Of course, with C++0x alot of this stuff becomes easier! A nice article how to do LINQ with c++0x http://tinyurl.com/d9zlsc [blogspot.com]
jk
A: 

Do you mean the monad (IEnumerable<> and the set of extension methods on it)? Do you mean the language aspect of it? Do you mean LINQ-to-SQL?

Justice
Well the LINQ-SQL part is the part I'd really want, but that depends on LINQ's language and monads.
Robert Gould
A: 

But now with boost there is the syntactic sugar needed...

ManicQin
+2  A: 

C++ 0x, or whatever it ends up being called, does have a new keyword called auto which allows for type-inference. And yes, there will be lambda's coming for C++. Also, a quick Google search revealed this, CLinq.

Chris
+1  A: 

You may take a look at PSade.Oven, a strongly boostified library working on STL ranges and providing a lot LINQ like functions.

zwvista
quite interesting, gonna give it a look when I get a chance, thanks!
Robert Gould
+3  A: 

Linq++ by Hong Jiang looks like a good start. Its syntax is much closer to Linq than CLinq's.

js
Very interesting work there
Robert Gould