waffle

Generic

Ayton proposes opt-in Objective-C generics. Yes! Perfect! This is exactly what I’m looking for for better clarity with Objective-C code, be it as read by a programmer or as parsed by a tool. This opens the door to way better Code Sense in Xcode and to smarter reasoning about code (with clang finally in the house, the language is starting to become the bottleneck). It also dropkicks one of the remaining semantic type deficiencies right in the face by providing a construct for saying “this method returns an instance of this class”.

Please, Objective-C team. (By which I mean bbum and everyone who works in his immediate vicinity, because I don’t know the name of anyone else on that team.) Take this proposal, figure out what’s not perfect about it, solve these problems and implement it.

Comments [+]

  1. Back in the depths of last month when I wrote that, Greg Parker (who’s one of the ObjC posse) said on the Twitternets that they’d been considering something like my “contextual types”, and the big hangup was syntax. I guess the fact that he didn’t mention the rest of it was a hint. ;-)

    By Jens Ayton · 2009.11.13 20:45

Leave a comment

Your e-mail address is never shown. If you type a line break in the comment, it will show up as a line break (naturally). The following HTML is allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)


Please note: Your comment will not show up at once. Unless you're spamming or being abusive, you have nothing to worry about. (Read the full policy.)