3 ms·
The point of C# being a better Java is nowadays mostly obscolete because of Kotlin being THE better Java. As for LINQ see https://github.com/mythz/kotlin-linq-e
by The_rationalist 6y ago
The point of C# being a better Java is nowadays mostly obscolete because of Kotlin being THE better Java.
As for LINQ see https://github.com/mythz/kotlin-linq-examples/blob/master/README.md https://github.com/mythz/kotlin-linq-examples/blob/master/RE...
- snuxoll 6y agoAny of the otherlang-linq projects miss the forest for the trees, the whole point of LINQ is that it's not a set of chain-able methods on IEnumerable - providers get access to the expression tree and can use them to do all sorts of crazy things (see: EntityFramework, Linq2Sql). I love Kotlin and I don't really get a hankering for LINQ when I'm using it, but I wish people would stop trying to say "but we can do that too!" when they really can't.
- foepys 6y agoWhy don't people understand that LINQ isn't just a C#-ish way to write SQL-like statements? So many people are comparing their libraries to LINQ without understanding what it actually does. LINQ brought System.Linq.Expressions and IQueryable to .NET which allows so much more than just filtering and grouping data. You can write entire data providers with LINQ and parse arbitrary expression trees in any way you like. Entity Framework (Core) utilizes this very well. It doesn't just query an SQL database and then use LINQ's Where, Select etc. to manipulate the data but parses everything the developer has written to an expression tree and then generates an SQL statement at runtime.
- scarface74 6y agoAnd the Mongo Linq library is often. For $reasons I worked on an implementation that had to support Sql Server and Mongo. The models and the Linq expressions worked across both and were translated appropriately. We just passed around a bunch of Expression<Func<T>>