Object-oriented vs functional programming: Core concepts explained