Jump to content

Objective-C - What an awful programming language


30 posts in this topic

Recommended Posts

  • 1 month later...
The thing with objective-c (cocoa) is you look at the source code of an example and see like 15 lines of code and viola you got a text edit application... and you're like but how does it get all that from that code, where's the "real code", that's my problem with it...

 

I sympathize with that. I learned to program basic and 6502 assembly, and only recently became comfortable with OOP. When you're used to running through every scenario and controlling it, it's hard to let go.

 

The reality is, most programs don't have much "real" code, they are just repeating everything over and over again. Cocoa pretty much frees you from that need. It's not the Objective C language, it's the libraries, btw.

 

It lets you focus on the algorithms that really are your program instead of worrying about other stuff. Of course, if you so desire, you can go back and change that underlying code and make it work.

 

I think Objective C is a great language, and I routinely use it on Linux as well, in gcc. Having said that, I think these whole "what language is best" fights are silly. It's a personal choice, and it's a case-by-case choice.

Link to comment
Share on other sites

  • 4 weeks later...

My problem with Obj-C is, I guess, no operator overloading. The function calls aka messages are pretty weird too.

 

Obj-C:

NSString *prefix = @"http://www.last.fm/music/";
prefix = [[prefix stringByAppendingString: [currentSong artist]] stringByAppendingString: @"/_/"];
NSString *full_url = [prefix stringByAppendingString:[currentSong title]];

 

C++ (approx)

std::string full_url = "http://www.last.fm/music/" + currentSong->artist + "/_/" + currentSong->title;

OK, you could get another line off the Obj-C code, but then it'd be even harder to read. Ugh.

If only Carbon was 100% supported, in the future as well, I wouldn't mind...

Link to comment
Share on other sites

Brain{censored}. That's a new one. Why don't we just fire up our hex editors and write the machine code ourselves. {censored} Readability! Compilation is for pussies! Wow, I didn't know we couldn't swear in the forum either. {censored}! That {censored} sucks.

Link to comment
Share on other sites

 Share

×
×
  • Create New...