Hacker News new | ask | show | jobs
by pawrvx 4723 days ago
LINQ is my favorite API of all times. It rocks.
1 comments

I totally agree. Sure there where similar things a in the funcional world before, but LinQ had some important pros:

- deferred ejecution by default, saving memory and time

- step by step syntax, each new operation is at the end, not the beginning

- excellent type inference and intellisense, js? ruby?...

- it works with the same syntax on the database!!! Haskell?

- map and filter where there, but groupby and join where not so common in previous query comprehensions APIs.

- the most important: it's actually usable in jobs you get paid for, not experiments you can make at home or university.

There are however two things that doesnt make it 100% perfect:

- expression tree lambas are identical to non expression ones, making it hard for developers to know if one step is going to be translated or executed. I would have chosen => for non expression and -> for expressions for example or something like that.

- having two syntax, method chain and query comprehensions, produces a frequent anoying back and forth since some operators are better written in one (let, join, group by) while others are only available in method chain (take, toDictionary...)