|
|
|
|
|
by dusklight
5933 days ago
|
|
You can sneak a lot of functional style programming into Java/C++. It's easier with C++ because they have first class functions, but you can do a lot even with Java. I think it's not optimal to do a 100% functional style, even though you can, because all the syntax junk gets in the way, but just by thinking in terms of higher order functions instead of objects it will make a lot of the pain go away. |
|
No it doesn't. C++ has function pointers, and you can make functors objects. But that doesn't make first class functions at all. Thinking in terms of higher order functions in C++ is just a different sort of pain, though it's admiteddly usefull sometimes. But you better like making template functors then.