What is preferred in Objective-c dot notation or square bracket notation?

Viewed 19286

I'm reading a book - Big Nerd Ranch iOS Programming. It says that dot notation is not recommended as it obfuscates code. I am simultaneously watching a Stanford Course for iOS programming and in it he is using dot notation extensively there. What would you recommend? I personally lean to bracket notation more.

Could you please explain how to covert this code to bracket notation?

self.display.text = [self.display.text stringByAppendingString:digit];

As I understand it should be:

[[self display] setText]:[[[self display] text] stringByAppendingString:digit];

Is it correct?

3 Answers
Related