3 ms·
I am something like an intermediate programmer and this is useful. I want to understand how FP replaces OOP in a similarly concise example. I have a sense that
by gt_ 9y ago
I am something like an intermediate programmer and this is useful.
I want to understand how FP replaces OOP in a similarly concise example. I have a sense that it involves a reconsideration of why OOP is useful, and solving that issue with a widely new approach, but I am not there yet myself. I’d love to see something like these Python comparisons but involving the demolition of an OOP implementation.
- wvlia5 9y agoI'll keep that in mind, thanks
- AlexCoventry 9y agoTry this: https://www.braveclojure.com/multimethods-records-protocols/ https://www.braveclojure.com/multimethods-records-protocols/
- gt_ 9y agoThanks. OK. This gave me a good outline. These ideas were somewhat right under my nose, in some of the Python concepts like closures and decorators. I don't know the languages here quite the same but the possibilities are convincing nonetheless. Hmmm... I could see myself getting carried away with this if I put some time into it.
- dukeflukem 9y agoHaving messed with Haskell I'd say the hidden data in OOP becomes "public" and that data is processed in pipelines. In C# you sometimes objects with just public getters/setters and static methods using linq manipulating those objects. This is kind of a functional style.