Hacker News new | ask | show | jobs
by grav1tas 5546 days ago
FP ~ Math/Formal Logics. OOP is a grab bag of theories, ideas and their applications to programming. Unfortunately I don't think that there's a generally accepted formal notion of what OOP actually is. On the other hand, functional languages, while there's some variance, all borrow from the same core principles. Moreover, feature parity in functional languages is a lot more clear in FP than in OOP. Terms such as "pureness" have a well defined meaning.

This is by no means a dogging of OOP. I personally think OOP seems to be better suited for practical business computing. Also FP, tends to have a higher learning curve (ex. monads) such that people of the street and in many academic programs gravitate towards the OOP paradigm. I think this could say something about how natural it is to use OOP, or maybe it just says something about how everybody is taught that programming "should be" (imperative vs functional).

1 comments

There are some attempts to formalize OOP. See Cardelli's "A Theory of Objects" (http://lucacardelli.name/TheoryOfObjects.html) for one example.
I've read some of this and it's good stuff. I guess where I was coming from was that OOP is already so scatter shot and widely used as such that even if somebody did formalize something based on OOP, it wouldn't be generally accepted as "the OOP standard". So many people have an idea of what OOP is based on the language they've used, and I doubt that if somebody formalized OOP tomorrow that everybody would rush to make their languages compliant to the model.

That being said, I suppose that a solid new language with formalized OOP models that was very useful could become the next Java/C++. Time (and marketing) will tell. I would be very excited about such a language >_>.