4 ms·
Functional programming C++ template library
- greg7mdp 13y agoWow, that is beautiful! Thanks.
- pubby 13y agoDoes this solve the problem of operator>>= being right-associative, while Haskell's (>>=) is left-associative?
- Schwolop 13y agoI find this a surprisingly good explanation of the benefits of functional programming, not just a how-to guide for the library. It probably helps that I've read LYAH first however...
- jeremyjh 13y agoThis is awesome. Maybe the successor to C++ will be C++. Another really neat library is libcppa[1], which provides erlang-inspired concurrency with the actor model but also support for general functional features like pattern matching and guards. [1]http://neverlord.github.io/libcppa/manual/index.html http://neverlord.github.io/libcppa/manual/index.html
- pjmlp 13y ago> Maybe the successor to C++ will be C++ Maybe ISO could do a Python 3 and remove the C cruft someday.
- reddit_clone 13y ago>Maybe the successor to C++ will be C++ True that. I really like where C++ is going. C++ is getting almost as expressive as ML. Thanks for linking the libcppa library. As a fan of Erlang and a former C++ day-jobber, I find this fascinating.
- msutherl 13y agoWhat happened to all of the excitement about functional programming?
- zerr 13y agoMy excitement lasted several years. I think it was enough :)
- pestaa 13y agoSounds like you are now back to imperative/OOP. If that is so, why?
- zerr 13y agoBecause of my excitement I almost jumped into academia, for PL research. Then, I realized that I have a family to feed :) and after all, I never really wanted to become a teacher/professor. As for the "real world" side - I'm in the domain where C++ is still the best tool - good enough high-level constructs (but could be better, of course, we're slowly moving toward it) along with low-level stuff and determinism.
- kozikow 13y agoAs less haskellish approach to functional programming boost library: http://www.boost.org/doc/libs/1_55_0/libs/range/doc/html/index.html http://www.boost.org/doc/libs/1_55_0/libs/range/doc/html/ind... is nice. It allows me to write: v | filtered( [] (int i) { return i % 2 == 0;}) | transformed([] (int i) { return i * 2;}) instead of: vector<int> filtered; copy_if(begin(v), end(v), back_inserter(filtered), [](int x) { return x % 2 == 0;}); vector<int> transformed; transform(begin(filtered), end(filtered), back_inserter(transformed), [](int x) { return x * 2;});
- malkia 13y agoChoking linker with lengthy symbols.... coffee time!