Vmheader
 

Archive for the 'Objective-C' Category

[[x alloc] init] is for noobs 11/05/2011 at 05:43AM

Why do I constantly see people writing "[[MyClass alloc] init]"? [MyClass new] is the same thing, so stop writing those ~10 extra characters. Just felt like I had to say something. Noobs.

P.S. it turns out "new" is actually older than "alloc init" but they're still the same exact thing.

P.P.S. I probably wasted more time writing this blog post than anyone has ever wasted by using the "[[MyClass alloc] init]" syntax.