News for hackers. Stuff that matters.
Re:“ZLinq”, a Zero-Allocation LINQ Library for .NET by jermaustin1 on Wednesday May 21, 2025 @09:16AM (#44051127)
I'm actually surprised reading some of those LINQ queries, first few pages, none of them (IMO) should be using query syntax. Hell, I hate query syntax to begin with, and use the extensions any opportunity I'm allowed.

But I would also say that the companies using query syntax are also vastly underrepresented on GitHub public repositories.

> It's likely a lot more common in fields where there are databases than where there are not.

I think beyond that, it's probably more common with developers that came from doing SQL queries but "needed" type safety.

I've worked with developers that didn't even know the extension methods existed. They went from SqlCommand to LINQ to EF or LINQ to SQL.

The only time I think query syntax is better than the extension methods is when dealing with table joins.

Re:“ZLinq”, a Zero-Allocation LINQ Library for .NET by david_allison on Wednesday May 21, 2025 @11:02AM (#44052241)
> The only time I think query syntax is better than the extension methods is when dealing with table joins.

Fairly niche, but query syntax is a great approximation of Haskell's do notation:

https://github.com/louthy/language-ext/wiki/Thinking-Functio...

EDIT: updated URL