|
|
|
|
|
by troupo
439 days ago
|
|
> I don't want functional-flavoured programming, I want functional programming. > you gotta stop using those for-loops and [i]ndexes, and start using maps, folds, filters etc. You mean what C# literally does everywhere because Enumerable is the premier weapon of choice in the language, and has a huge amount of exactly what you want: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enu... (well, with the only exception of foreach which is for some odd reason is still a loop). > But 5 years after that Since .net 3.5 18 years ago: https://learn.microsoft.com/en-us/dotnet/api/system.linq.enu... > So we paid the price, but didn't get the reward. Who is "we", what was the price, and what was the imagined reward? |
|
Slow down and re-read.
>> You get: the knowledge that your function's output will only depend on its input.
>> You pay: you gotta stop using those for-loops and [i]ndexes, and start using maps, folds, filters etc.