Hacker News new | past | comments | ask | show | jobs | submit login




I don't mind C# not using that name because .Where doesn't actually filter the object, it returns an IQueryable, which you can chain further statements onto, then filter.


That's basically what filter does in Clojure (and probably any other language with lazy evaluation): http://debasishg.blogspot.com/2010/05/laziness-in-clojure-so...


The LINQ API is modeled after relational algebra (where `Select` acts as projection, and `Where` acts as selection, etc.), which is as good a basis for operations on collections as anything. It is not even clear that other popular names have precedent, let alone especially useful expressive power beyond what normal relational algebras afford.

Besides that, one of the early intents behind LINQ was to allow a language-integrated ORM, so LINQ's choices for names are actually extremely appropriate.


The comment replied to was about missing its like in other languages. Didn't mean to imply that its name should be changed in C#.


Not sure why this is getting downvoted, that's what it's called in most other languages.


Nah, it's spelled Select: http://www.w3schools.com/sql/sql_where.asp

(but academics like non-human-friendly terms, sure)


No.

Select == Map

Where == Filter

SelectMany == FlatMap

Aggregate == FoldL


No idea what point you're trying to make.

On human-friendliness, filter can read as a physical metaphor, so scores rather well. Just need to remember whether what's caught is kept or discarded.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: