DEV Community

Discussion on: Stop using if else

Collapse
 
rjitsu profile image
Rishav Jadon
  • 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