4 ms·
I think you're conflating languages that strongly support OO with OO itself. OO is a paradigm, a way of organizing your program. Using classes (meaning, as a la
by icambron 13y ago
I think you're conflating languages that strongly support OO with OO itself. OO is a paradigm, a way of organizing your program. Using classes (meaning, as a language primitive) as namespaces and not as, well, classes is specifically avoiding OO programming. That's fine and, like you said, perfectly pragmatic, but it's not writing "functional code in OO". It's just repurposing language primitives that were designed for OO .
- dasil003 13y agoI agree with your specific response here, but I think it's worth pointing out that it is in fact possible to mix OO and FP (ruby is particularly suited for it). You can design systems around classes which are treated as value objects, immutable once initialized, and thus maintain the core tenets of OO and FP in a single program. I guess the definitions of FP and OO are fuzzy enough that someone will probably come and tell me why this isn't a true Functional architecture, but so far I haven't seen anything close though to a consensus on what the strict requirements of FP really are such that it would preclude any form of binding data and methods. Specific languages are one thing, but when talking about programming paradigms in general I see them as forming a hugely overlapping Venn diagram.
- icambron 13y agoYes, I fully agree with that.