What role do you believe lambdas and support for functional programming play in object-oriented programming courses?
What role do you believe lambdas and support for functional programming play in object-oriented programming courses?
Most algos classes would probably benefit from streams, and there are many of them being taught in Java for reasons unrelated to OOP. Universities often stick to one language for much of the programming curriculum.
Pointless. They are OO courses, not FP courses. You have FP courses already covering that.
> second that under the hood everything can be shoehorned to object model.
You do not need lambdas or FP for that.
So, what's the point of lambdas and FP in a OO course?
If the intent is actually to teach polymorphism and encapsulation, both of those can be done in raw C.
However, polymorphism and encapsulation have existed for much longer than “OO” languages. What is stdout? Seems pretty polymorphic to me. How does one gain access[1] to a variable declared in a .c file that is not exposed via the header. That’s encapsulation…
[1]: there are of course ways, but they are often also true of private members of class instances too.