3 ms·
This is equivalent to the semicolons in javascript debate. Pointless bike-shedding. You save 4 characters, big deal.
by overcyn 13y ago
This is equivalent to the semicolons in javascript debate. Pointless bike-shedding. You save 4 characters, big deal.
- jayvanguard 13y agoI agree. Putting in the id return or not is irrelevant. I also think his larger point is important though. The general trend towards more explicit typing being the default is a move away from Objective-C's Smalltalk roots and this is a bad trend. I suspect it is somewhat influenced by Java programmers invading the Objective-C space and spreading their rigid typing, pattern-itis cancer.
- mpweiher 13y agoYou are right about your suspicion. In fact, one of the central characters came out an flatly stated that Java was a better language. He had a hand in the "modern syntax" (anyone remember that?), property dot notation and the GC implementation that ultimately failed. He also once said to me that Objective-C being a statically typesafe language was a fact that could not be argued about. Hmm. Also agreed that whether the (id) is there or not doesn't matter (much). I myself have been happily reading over it without really noticing for upwards of two decades now. What bugs me is the claim that it has to be there.
- mpweiher 13y agoThanks for the feedback. I thought I was fairly clear in the article that I don't really care whether you add the (id) or not, as long as you know why you are doing it, but it appears I wasn't. I've amended the article to be better about this. If you think it increases readability for you, OK. If you want to conform to whatever Apple recommends, OK. What worries me is that apparently (the discussion confirms this), Apple has managed to push the notion that there always have to be types, that Objective-C is not an optionally statically typed language. Both parts of "optionally statically typed" are useful, the static typing and the fact that it is optional.