This is a question about LINQ the .NET language feature, not LINQ to SQL.
I find that the ability to query almost any in memory collection in such a consistent and declarative way is one of the best language features I've ever come across.
I find it extremely useful, and I love the clean abstraction it provides. LINQ can even be used to query Strings, indeed its extremely flexible.
My questions are:
cheers
The idea of language integerated query is not new, the way MS puts it is unique and new. It is affected by Haskell and SQL syntax, Haskell had the idea of enumerators and lazy evaluation which is the core underline principle in implementing LINQ, in fact LINQ is just a syntactic sugar.
I feel link is a great bridge between reasoning about your programs and data in an abstract and clean way.
Speaking as a querying of in memory collections, no this is not a unique feature. Take for instance F#'s pipe forward operator. It allows you to write very similar style operations as you would a linq query.
Take for instance the following code which extracts digits from a string and sums them
"foobar42".ToCharArray()
|> Seq.filter System.Char.IsDigit
|> Seq.map (fun x -> x.ToString() )
|> Seq.map System.Int32.Parse
|> Seq.sum
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With