|
|
|
|
|
by tman
5846 days ago
|
|
Where functional programming in C++ falls apart is this step: bind(std::plus<int>(), _1, bind(&Die::faceValue, _2))
When I first learned the STL, I worked pretty hard to figure out bind, etc., and get rid of all my for loops. The problem is that it doesn't actually buy you that much. The for loop is uglier, but simpler to maintain, read, and debug.Luckily the lambda syntax from the new standard already appears to be available in experimental gcc. This is going to be a game-changer. |
|