User loginNavigation |
Is 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… By Koray Can at 2006-02-10 00:32 | LtU Forum | previous forum topic | next forum topic | other blogs | 9965 reads
|
Browse archives
Active forum topics |
Recent comments
23 weeks 1 day ago
23 weeks 1 day ago
23 weeks 1 day ago
45 weeks 2 days ago
49 weeks 4 days ago
51 weeks 1 day ago
51 weeks 1 day ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago