3 ms·
It's better to write code that is amenable to being understood when read. These Java forms accomplish things 'the LINQ way' but at the expense of completely obs
by jameshart 11y ago
It's better to write code that is amenable to being understood when read. These Java forms accomplish things 'the LINQ way' but at the expense of completely obscuring the intent of the code. LINQ makes sense in C# because the syntax supports a mapping from a declarative query to stream-oriented operations. Without the syntactic support, it becomes unreadable.
- tracker1 11y agoI usually prefer the chaining method extensions for collections myself... Even then it's far easier to follow than the Java examples, or even the Java8 comments... but that's mostly personal preference. I'm also not sure how/if this has an IQueryable interface equivalent, which is pretty cool as well.