Saturday 15 September 2007

Retain Release Revolt - Bring Me Leopard Objective c2.0

So I ripped out the Ruby and got my new project running and have been writing the methods that were done in Rubycocoa

The only trouble is.... You do an ebay search and it produces the right results. Try again and it produces nothing. Open a web address, it works. Try again it crashes.

I now have to wrap my head around memory management properly. I understand what I'm supposed to be doing but I need to go into my code and start working out where to retain/release/autorelease. Having come back from Ruby, I find myself longing for Objective C2.0.

The bit that I need to take on board is where objects are retained automatically by adding to collections and when to release the collections and create a fresh object.

It's not rocket science, but I'd prefer not to have to do that kind of thing.

Garbage Collection I <3 you.

I went to an Apple Leopard Dev event last Winter and the stuff on Objc2.0 was cool, I can't believe I'm under NDA. actually I'm not because they forgot to ask anyone to sign it, but everything I know is already on Apple's website anyway.

October can't come soon enough.

Things I'd like to see in Leopard for dev's
Easier syntax for arrays and dictionaries.
Yes its not that bad now, but Ruby is so much clearer ( like most languages )
howabout
NSArray* myarray = @( obj1, obj2, obj3 )
or
NSDictionary *mydict = @{ obj1, @"obj1", obj2, @"obj2 }

That would be nice and fast

  • CoreData connecting easily to mysql

  • Set/Get creation syntax.

  • Set/Get that works with keypaths. Then I wouldnt need to type


    [ myobject valueForKeyPath:@"path.path" ], instead I could use [ myobject.path.path ]




Stuff that we know is coming from Apple's website


  • Easier array iterators. Thats welcome. I love Rubys Array.each{| element | code }

  • Garbage Collection - yay

  • Easier accessors - yourobject.value really those []'s get a bit of a mouthful sometimes

  • Better error hiliting in xcode, yay. I love textmate, wish xcode was a bit more like that.

  • Core animation I want to do a spinner, praps this will be the best way




Update, how easy was a spinner, duh!

No comments: