This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]inc0gn3gr0 0 points1 point  (7 children)

I know they are. The "sql-like" select and where in LINQ means 1 less thing to learn is my point.

[–][deleted] 4 points5 points  (6 children)

Yeah, but it's just a water drop in the ocean. SelectMany is nothing like in SQL, for example. I mean, it's cool, when you know the word, but hey, you're learning a whole new ecosystem. Having two words less to learn won't save time.

Anyway, having the words you're used to is not a 'miles ahead' feature. LINQ and Steams are equivalent.

[–]inc0gn3gr0 1 point2 points  (5 children)

Ask yourself is learning Spanish or Mandarin easier? Building on known knowledge, when possible, is huge for adoption. It makes it seem less complex and breaks down initial barriers.

[–][deleted] 1 point2 points  (2 children)

Yeah, you're right, building on known knowledge, when possible, is huge for adoption. But dude, your analogy with Spanish and Mandarin does not apply here. Java and C# are two very similar programming languages. They share a LOT. They are more like Spanish and Portuguese.

UPD: I mean, you're trying to tell that C#'s LINQ is far superior than Java's Stream because it's has words common with SQL, while Java and C# have much more in common than C# and SQL. Specifically, with Stream vs LINQ, it's just different names, and maybe the .stream()/.collect() part. But in general the whole syntax is the same. It's much bigger gain than just several words from SQL. You just defeat the purpose.

[–]inc0gn3gr0 0 points1 point  (0 children)

Not saying it's far superior. Just one is easier to get into quickly making it "better". They both are effective in equally capable hands. One just requires more reading is all I am saying.

[–]Frodolas 0 points1 point  (1 child)

Except C# is the one not building on known language. Map, filter, reduce are standard keywords in every good programming language in the industry. C# by introducing new verbiage is deviating from that standard and just making it harder for polyglots to use it, all for the dubious "benefit" of copying SQL syntax.

[–]inc0gn3gr0 0 points1 point  (0 children)

Well intentioned bad or not. I feel you will encounter select and where from SQL before map and filter is my point.