After reading this article by Robert Brautigam on DZone, I was convinced to get rid of null checks in the code of Rummy. The article shows that these checks make code less readable and null parameters acceptable. Instead, we should deal with null as a programming error and let NullPointerException occur.
After reading this article by Robert Brautigam on DZone, I was convinced to get rid of null checks in the code of Rummy. The article shows that these checks make code less readable and null parameters acceptable. Instead, we should deal with null as a programming error and let
NullPointerException
occur.