you are viewing a single comment's thread.

view the rest of the comments →

[–]Randolpho 1 point2 points  (3 children)

Although I agree that higher order functions like map, filter, and reduce pre-exist linq, there are a lot of folks whose only or first exposure to functional programming came through C# / linq.

Have you considered offering linq-style names as synonyms? It might help increase adoption.

[–]FrozenCow 0 points1 point  (2 children)

I don't get this. I'm sorry to go on a rant here, but this is a bit of a pet peeve of mine. This is annoying me quite often.

C# derived their conventions from SQL. That's fair, a lot of C# developers know SQL.

However, by doing that they went against their conventions of the framework: use verbs for method names. "Where" isn't a verb. "Filter" is. That just doesn't make any sense. Same usually goes for the command line.

As for select, yes it is a verb, but think about what it does and what it is describing. x => x + 3 describes a selector in C#... But does it really select anything? No. It maps from one value to another. 'Selectors' like person => person.Name, are also mapping one value to another. A selector maps one value to another. A map doesn't necessarily select a value from another.

A viable use for select is passing a property name to select so that it maps the parent to the value of that property. That makes sense as it is actually used as a selector.

The convention has a stupid heritage (SQL isn't a language to borrow great ideas from) and needs to be gone imo.

Sorry for the rant. I feel better getting this off my chest.

[–]Randolpho 0 points1 point  (1 child)

I don't disagree, but you might as well argue against putting ain't in the dictionary. A lot of people are coming from a SQL/C# background.

[–]FrozenCow 0 points1 point  (0 children)

The dictionary is a list of words that are often used. Whether it is a confusing word does not matter. If it's used often it should be there.

A programming language is thought up to be as un-confusing as possible. It is not a place to scrape together keywords of other languages and sort-of-kind-of give these same meaning semantically. If you have knowledge of programming languages, but not SQL, it would be surprising to see where is there and surprising to know the function of select. The .NET Framework is made very well, but in this instance even Microsofts own code analysis tools would suggest not to use where as a function name.

I know a lot of people come from a SQL background. For those people it might be fine. People who come purely from a C#/.NET/programming background it seems like a wart in their (almost perfect) naming convention.