May 5, 2022
Now I like FP as much as the next guy, but this is just bad code. 'this' and 'this other thing' should be methods on the Cat and Dog class that override the one from Pet. For OOP, checking instance types is a major code smell.
Now I like FP as much as the next guy, but this is just bad code. 'this' and 'this other thing' should be methods on the Cat and Dog class that override the one from Pet. For OOP, checking instance types is a major code smell.
Software Engineer at Mendix (Rotterdam, The Netherlands) • Student MSc Software Engineering • Functional programming enthusiast