Archive for November 12, 2009

Thursday, November 12, 2009 [Tweets] [Favorites]

Generics in Objective-C

Jens Ayton proposes that adding generics to Objective-C would allow for better static analysis with no changes at runtime or to existing code. Jesper concurs. This seems like a reasonable idea, although I’m not sure it’s worth the hassle and visual clutter. I don’t think improper typing is a major source of bugs.

Blocked-C

Marcel Weiher points out that blocks are noisy compared to HOM. Of course, HOM can be more concise because it’s so much more limited. Chiefly, it requires predefined methods. He argues that this is a feature, not a bug, that HOM encourages good code and blocks encourage bad code. That’s not wrong, but with power comes the ability to shoot yourself in the foot. Blocks make the language much more expressive and solve problems that HOM can’t. Used judiciously, they can make for clean code.

cdecl

Peter Ammon’s cdecl.org translates C type expressions (including function pointers and blocks!) into English—and vice-versa.