I was reading the second chapter of your book and came across the part where you mention that we can just send messages to objects without nil-checks; it came off as if you were suggesting we should adopt this style of programming. As developers, we are all naturally lazy; we love to automate so that we don’t have to do rudimentary tasks, however I have to disagree with this statement.
I’ve always learned that the programs we write should be as lean as possible, and that good programming standards should be followed. Being new to iOS, I’m not sure if it’s the case as it is with other languages, but it seems to me that checking a value to make sure it’s nil would be operationally lighter and faster than sending a message to an object, and then waiting for a response; even if that object is nil.
I would argue that prospective developers should be advised to follow good practices and always check to make sure that the items they are passing, and objects they are using are valid, before using them. This would be a great lesson to impart to people who would potentially go to other languages that would crash if said precautions were not taken.
Any thoughts on the matter? Please correct me if I’m wrong on the speed comment.
Thanks for your time,