3 ms·
Why on earth they named map as s Select and flatmap as SelectMany, I'll never understand. Still vert useful tho. (I first learned FP with Scala, so the names f
by karmakurtisaani 2y ago
Why on earth they named map as s
Select and flatmap as SelectMany, I'll never understand. Still vert useful tho.
(I first learned FP with Scala, so the names from there feel the most natural to me, tbh)
Edit: it just occurred to me it has to be SQL inspired or something like that.
- rjbwork 2y agoYeah it was intended to be easy to learn to people familiar with SQL. LINQ2SQL and Entity Framework are basically a way to query your database by constructing an abstract representation of your query using strongly typed bindings in your application code. So then the extension method syntax of it was a great way to sneak functional list programming idioms into it. Watching the proliferation of functional style in the .NET ecosystem over the past 15 years has been pretty impressive, IMO.
- karmakurtisaani 2y agoIndeed, I worked in Scala for a while, dabbled with rust on my free time and am now back to writing C#. Although I prefer the two first, I have to say the ergonomics have improved significantly in C# and there are now nice options for rewriting legacy spaghetti OOP-code.
- bazoom42 2y agoMap is Select and filter is Where to align with SQL keywords.