My lovely ASCII art NOTE

For when nothing else will to place a warning, in your code, to your future self or your fellow developers paste this: // // NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE // NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE // NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE // NOTE NOTE…

Read this article

Overriding NSCopying copyWithZone:

In the wild I sometimes see the following as implementation of NSCopying:copyWithZone: -(id)copyWithZone:(NSZone*)zone { MYClass* copy = [MYClass new]; copy.property1 = self.property1; ... copy.propertyN = self.propertyN; return copy; } This is wrong as accessing the copy and the original objects through . during the copying process itself must…

Read this article

Clever ain't wise

I just figured out what bothers me the most (among several other things) about Objective-C: in its current incarnation it is being to too clever with names. It heavily breaks the principle of least surprise (in this case being: "name things as I wrote them, don't make stuff up") I…

Read this article

Swift design talk

Last night I presented a small introductory talk on Swift under hopefully-not-too-pretencious name of "Swift Design". I talked about what could have been the primary goals of Swift and how Apple has achieved them, doing sort of speculative reverse engineering of Swift design choices. I have uploaded the PDF and…

Read this article

Clashing protocol functions cannot be disambiguated

I'm going to classify this as Swift issue but only because it's a new language. The same problem exists in Objective-C. I've already reported it to Apple and it's on Open Radar as well. Description Consider a class implementing two protocols with clashing function declarations (name + all parameter types). Currently…

Read this article

Frugal cloud

Why do we optimize? I'm used to optimizing the speed and memory consumption to improve the user experience, to allow new features that would otherwise be prohibitively expensive, to be able to do more in less, to avoid forcing customers to upgrade their hardware unnecessarily and so on. But this…

Read this article