Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OOP is about large scale, and FP is about small scale. They best work together.


> OOP is about large scale, and FP is about small scale

Sorry, but this is an extremely audacious claim to make without backing it up.

I also think "FP is about small scale" is quite wrong, looking at empirical evidence.


If you are interested in this topic, I recommend you reading Martin Odersky's papers on Scala design.


Maybe you can just let it go and think of it as an "opinion" or based on years of experience? Doubt you will find a journal article laying the foundations you desire.


Modularity is about the large scale. OOP should not highjack the exclusive rights to the tools introduced long before it became popular.

I'd always prefer the SML module system to anything OOP for a project of any scale.


>I'd always prefer the SML module system to anything OOP for a project of any scale.

There's a problem. I don't know any project which was implemented with SML on scale (I mean at least several MLOC).


Ok, choose the Ada modules instead. And Ada was used for many MLOC scale projects.


I don't have experience with Ada, but I suspect, all its cool modular features can be expressed in Java (and sure in Scala).

Could you give examples of features that you would like to have in modern OO languages which are available in Ada?


I am not talking about any "cool features" in particular. My point is that for the large systems you need a decent module system and namespaces, not the OOP.

The fact that most of the statically typed OO languages also provide these features does not mean that OO is suitable for scalability - this is totally orthogonal to OOP.

This is a fallacy similar to attributing pattern matching and ADTs to the functional programming, while these features are not inherently functional in any way.

Try to build a large system in a dynamically typed OO language to see why OO per se is of no use for a large scale architecture at all.


I think, you are making mistake here. You shouldn't treat objects as objects, but as instances of modules. If you see it this way, everything looks much better in OO languages.


Why do I need any OO in the first place, if the only value they can offer is in a poor man substitute for modules? I'd rather use the proper modules instead, with generic (i.e., inherently anti-OO) features.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: