Hacker News new | ask | show | jobs
by relevate 3768 days ago
This is where I think LINQ does a good job.

  var coworkers = departments.selectMany(department => department.employees);
Nearly equivalent to the Scala code, but uses more approachable keywords like `select`, `selectMany`, and `where` instead of `map`, `flatMap`, and `filter`.
2 comments

It makes a lot of sense in .NET land, because it maps to SQL, which people tend to have some kind of grasp on.

Although that LINQ expression syntax can go die in a fire. It's a great way to end up with people using borked up joins in Linq-to-SQL and EF that don't work the way they think they do, rather than the actual foreign-key relationships.

Or people could just learn the correct terminology.