Sunday, 28 November 2010

Why am I finding Objective-C and Cocoa difficult?

I have mainly been thinking about why the whole thing feels quite alien to me. I will use this post to remind me what the initial problems were. (Most are probably caused by several years of Python programming .. where most things are easy.)

Objective-C Pains
  • The syntax used to define a class seems awkward. And I hate repeating the method declarations in the .h and .m file.
  • I am having a real job remembering to add semi colons to every statement.
  • 12/06/2011: Memory allocation is something I have not had to worry about for a long time (good old Python).
  • More later...
Cocoa Pains

  • The GUI Api is not what I would call orthogonal. I seem to have to consult the documentation for each Controller. For example I would Expect the Api for a Label to be very similar to that of a Button. However, they differ even in the way they are created. The Label has to be allocated before inititalise with a frame, the Button does not have to be allocated and gets its frame later.
  • More later...

No comments:

Post a Comment