it's not just using an object, it's the context in which you use it, so there's no need to say this isn't OOP, yes I gave a small example but you can see there are examples in the comments supporting the idea.
of course they're not fully interchangeable but in certain cases they are.
No one said it's bad, it's just better to use other alternatives where everything is being repeated.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Discussion on: Stop using if else
Replies for: Using an object doesn't mean that you're doing OOP. else if and Map both work for your case, but they're not interchangeable in general - one is a...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse