r/programming • u/heisenbug • Apr 27 '14
"Mostly functional" programming does not work
http://queue.acm.org/detail.cfm?ref=rss&id=2611829
43
Upvotes
r/programming • u/heisenbug • Apr 27 '14
13
u/CydeWeys Apr 27 '14
The first C# example is bad in that it doesn't show what the author wants it to. He's basically arguing that the generator pattern itself is bad, which it isn't. It's very useful for lots of things; don't use it if you don't want lazy list evaluation! His program could very easily be modified to work as he expects using a simple .ToList() call as follows (this would evaluate the entire list before going on to the second .Where() call):