User Name
Password
AppleNova Forums » Programmer's Nook »

What's the deal with objective C


Register Members List Calendar Search FAQ Posting Guidelines
What's the deal with objective C
Thread Tools
Partial
Stallion
 
Join Date: Feb 2006
Location: Milwaukee
 
2010-04-07, 00:29

Why is Apple still using this as their platform's language? I haven't really used it, but I hear it's even a bigger mess to code in than C++. Anybody have any thoughts on that? Any future plans to move to a C# type language, with automatic memory allocation, garbage collection, java-type syntax, etc? Java Schwing is pretty nasty but I hear .Net and C# are really solid for desktop stuff.


...and calling/e-mailing/texting ex-girlfriends on the off-chance they'll invite you over for some "old time's sake" no-strings couch gymnastics...
  quote
scratt
Veteran Member
 
Join Date: Jul 2004
Location: M-F: Thailand Weekends : F1 2010 - Various Tracks!
Send a message via Skype™ to scratt 
2010-04-07, 01:12

You are hearing wrong. It's a great language. I suggest you read up on it, as you obviously are not that well informed about it's features.

And hell will freeze over before Apple go to C#. (Which is awful to code in btw).

In fact hell will freeze over before Apple drop Obj-C.

'Remember, measure life by the moments that take your breath away, not by how many breaths you take'
Extreme Sports Cafe | ESC's blog | scratt's blog | @thescratt
  quote
Majost
monkey with a tiny cymbal
 
Join Date: Nov 2004
Location: Lost
 
2010-04-07, 01:21

It's hard to objectively answer that question, especially when you phrase it that way. Looking for a flame war?

I haven't really used C++, but it scares me. It's an absurdly large language. I come from a C background, and I have found Objective-C to be a beautiful way to add OOP without it becoming a monster. Sure, it's more limited than C++ in some regards, but that is a very good thing in my book. It took me a bit of time to come to terms with messaging, but I really like it now.

What really makes Objective-C work are Apple's coding style and frameworks. Memory management is really simple once you learn a few key rules, but that can be a moot point if you're coding for 10.5+ and enable garbage collection. And Apple's frameworks are precisely why they'll stick with it. Cocoa, Foundation, AppKit, and now UIKit are all strongly rooted in Objective-C. It is really solid for desktop stuff.

I don't know what you mean by automatic memory allocation, but in most languages you need to request a new Object() at some point. Objective-C just calls it: [[NSObject alloc] init] (but you can also just do [NSObject new]).

Garbage collection will come to iPhone OS when the devices can handle it. They simply cannot give good performance with it on at the moment. And Apple's working on your java-style syntax, much to the chagrin of some developers. You can now access an object's setters and getters through the dot operator as a shortcut to the messaging syntax. Beyond that, though, I'm afraid you're out of luck. All is not lost, though... the named message parameters really do make code marvelously readable. Spend some time with it and I think you'll come around.

And for the love of all that is holy, never try to code a GUI in Java.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2010-04-07, 05:57

Obvious flame is obvious.
  quote
Partial
Stallion
 
Join Date: Feb 2006
Location: Milwaukee
 
2010-04-11, 17:01

It's not an attempt at a flamewar. I don't get it. I can't believe they still don't have automatic garbage collection and memory allocation. These are features of languages that are proven time savers.

I'm a java developer with a CS degree so I've done my fair share of C++ and C development. Without a doubt you can get things done faster in a managed language like Java versus C++.

I guess I'm just wondering why they aren't going that route when everyone else seems to think that managers and/or dynamic languages are becoming all the rage?

...and calling/e-mailing/texting ex-girlfriends on the off-chance they'll invite you over for some "old time's sake" no-strings couch gymnastics...
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2010-04-11, 17:04

Objective-C 2.0 does have garbage collection, just not on the iPhone, presumably to save on resources for the time being.
  quote
Partial
Stallion
 
Join Date: Feb 2006
Location: Milwaukee
 
2010-04-11, 17:12

Quote:
Originally Posted by chucker View Post
Objective-C 2.0 does have garbage collection, just not on the iPhone, presumably to save on resources for the time being.
That is good to know I did not know that. See, this is informative.
  quote
scratt
Veteran Member
 
Join Date: Jul 2004
Location: M-F: Thailand Weekends : F1 2010 - Various Tracks!
Send a message via Skype™ to scratt 
2010-04-11, 22:02

Quote:
Originally Posted by Partial View Post
That is good to know I did not know that. See, this is informative.
As would have been doing some research on your own behalf before coming here and making statements of fact that show you don't know what you are talking about.

'Remember, measure life by the moments that take your breath away, not by how many breaths you take'
Extreme Sports Cafe | ESC's blog | scratt's blog | @thescratt
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
Objective-C Problems King Kovifor Programmer's Nook 14 2008-01-28 23:41
Objective-C: NSView Help jyo Programmer's Nook 2 2006-11-11 20:48
Need help from the objective-C gurus MBHockey Programmer's Nook 0 2005-12-17 14:14
a doubt in Objective C ... mlramya Programmer's Nook 1 2005-12-15 23:50
Objective-C vs. Java ezkcdude Programmer's Nook 47 2005-11-26 15:21


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 22:52.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova