Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

objective C ain't so bad

Name: Anonymous 2010-12-02 20:25

Recently did a lot of objective C programming.  The nice thing is that it's a superset of C, so whenever the standard libraries would make me rage I would just do whatever it was in C.

The message passing syntax is super ugly of course if you're used to C style function calls.  I got used to it eventually but it certainly is still a language flaw in my opinion.  The silver lining is that named parameters actually work out ok with XCode's limited code completion.

I treated the language as C basically, using the objective parts sparingly for encapsulation purposes, a couple standard libraries, and iphone api calls.  It worked out pretty well.

Overall it offers a bunch of optional conveniences without sacrificing the power/performance/simplicity of pure C.  For instance built in include guards are nice.  Having a bit more extensive standard library is nice.  The memory management system for objective C objects is actually OK once you get a feel for how it works(though it's not really intuitive).

One of my biggest gripes is that a lot of the standard library only takes other objective C objects, so its of limited use if you code primarily with primitive data types. 

My other big gripe is that it's standard library performance is unreliable.  I was writing a performance intensive game and I found that some of the standard libraries are far far slower than they have any right being.  Additionally there is a message passing cost which may or may not be an issue depending on who you ask.

tl;dr Objective C is C with some extra optional stuff that you may find useful.  Of course just like with C++ the optional stuff allows for more flexibility in programming style(and more ways to write bad code).

Name: Anonymous 2010-12-02 20:37

tl;dr You like C, and Objective C's shittiness is largely ignorable if you barely use it.

Name: Anonymous 2010-12-03 6:44

at least it ain't C++

Name: Anonymous 2010-12-03 7:04

One word, The D Programming Language. Thread over.

Name: Anonymous 2010-12-09 16:39

Don't change these.
Name: Email:
Entire Thread Thread List