Re:Why LINQ beats SQL
by ConnorLeet on Thursday February 16, 2017 @05:01PM
(#13663931)
Array.reduce(), Array.filter(), Array.map(), in JavaScript are pretty LINQ-ish if you ask me!
[ Parent
| on HN ]
The thing with LINQ is that it can represent itself (reified or 'quoted code), so you can transform it into SQL, GPU instructions, whatever. This isn't a new idea, and F# had it before C# did (and LISP had it before, and others).
map/filter/reduce are just basic functional programming elements.
They are nothing even remotely likely linq. Those functions return the resulting arrays. Linq expressions are not executed until enumerated.
This allows you to compose linq expressions without computing intermediate results.