Skip to content

Instantly share code, notes, and snippets.

@steckel
Created January 15, 2012 20:38
Show Gist options
  • Save steckel/1617124 to your computer and use it in GitHub Desktop.
Save steckel/1617124 to your computer and use it in GitHub Desktop.
Objective-C meh

Why do we need to tell Objective-C what types of pointer variables something is when it's obvious after we alloc it?

NSFetchedResultsController *aFetchedResultsController = [NSFetchedResultsController alloc]

Shouldn't it be as simple as

aFetchedResultsController = NSFetchedResultsController alloc

?

And, does anyone else get annoyed with bracketing? Would a hard return and meaningful indenting be useful to anyone?

aFetchedResultsController = NSFetchedResultsController alloc
  initWithFetchRequest: fetchRequest
  managedObjectContext: self.managedObjectContext
  sectionNameKeyPath:   nil 
  cacheName:            @"Root"
@steckel
Copy link
Author

steckel commented Jan 15, 2012

I guess I'm just too spoiled and used to high-level programming languages.

=P

aFetchedResultsController = NSFetchedResultsController.alloc().initWithFetchRequest(fetchRequest).managegObjectContext(self.managedObjextContext).sectionNameKeyPath(nil).cacheName(@"Root")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment