User loginNavigation |
archivesIs STL algorithms doing damage to the cause?I like STL’s containers. However, no matter how hard I try, I can’t enjoy using STL’s algorithms (by which I don’t mean sort, but for_each, transform, etc.) They require excess baggage, forcing me to invent weird structs to act like functors or to declare redundant variables (with very verbose types) to collect the results, etc. I desire the Haskell version that I see in my head, but the C++ version that pours from my fingers into the buffer looks ugly and rigid. Disappointed, I end up converting them into explicit loops because they somehow look cleaner. I wondered if this ever happened to somebody else, and I found this thread started by Scott Meyers in comp.lang.c++.moderated. It’s a gigantic thread, but from some of the (both pro & con) arguments I’ve read, I realized that it is just not fair to discuss these concepts in a C++ setting just like it’s not fair to discuss static typing in a C++ setting. So, I wonder if (non-FP) people’s experience with STL is bad PR for FP… |
Browse archivesActive forum topics |
Recent comments
23 weeks 3 hours ago
23 weeks 6 hours ago
23 weeks 6 hours ago
45 weeks 1 day ago
49 weeks 3 days ago
51 weeks 14 hours ago
51 weeks 14 hours ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago