Hacker News new | past | comments | ask | show | jobs | submit login

Isn’t OOP a subset of imperative programming and functional a subset of declarative programming?



Not really. For example ocaml allows oop in a functional programming language.

OOP is about encapsulation of data and algorithms which deal with that data in logical units (objects) and allowing certain operations eg inheritance, polymorphism (sometimes) etc over those objects. It can be declarative or imperative.


You can be very declarative with OOP.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: