Keeping your code clean
Samuel James

Thanks for the article, it was a good read.

If I could say one thing:

> Avoid ‘If’ and ‘switch’ statements

I think this should be clarified as “Avoid using conditionals to implement type-dependent behaviour”

Conditionals in and of themselves aren’t really bad, its just switching on types which is problematic, since it couples knowledge of the underlying class hierarchy to the caller.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.