New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

View Poll Results:
0 0%
Voters: 0. You may not vote on this poll

Best programming language for Mac


Post Reply New Thread Subscribe

 
Thread Tools
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
I bet this is a really silly question for anyone to be asking? Infact I know it is...
I wanna know which language is preferred by the Mac Development Community in general.
QUOTE Thanks
Aptmunich

 
Aptmunich's Avatar
 
Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
Aptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant futureAptmunich has a brilliant future
Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2

Aptmunich is offline
None of the above.

Objective C is.
QUOTE Thanks
eddielee

 
eddielee's Avatar
 
Member Since: Sep 19, 2008
Location: Nottingham, UK
Posts: 302
eddielee is on a distinguished road
Mac Specs: 20" iM ac,13.3" Aluminium Unibody Macbook, iPhone 4

eddielee is offline
I use Java..but only because I only know that and VB.net lol

Thanks, Eddie
Software Engineering Student, NTU
QUOTE Thanks
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
Quote:
Originally Posted by Aptmunich View Post
None of the above.

Objective C is.
Ok... someone needs to clarify with me about C and its variants.

I know that C++ is a higher level variant of C which supports things that C does not... i.e, object orientated programming.

what exactly is Objective C? And when compared with a program written in C how is the execution speed?
QUOTE Thanks
mystic_fm

 
Member Since: Mar 15, 2007
Posts: 161
mystic_fm will become famous soon enough
Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM

mystic_fm is offline
Quote:
Originally Posted by knightjp View Post
Ok... someone needs to clarify with me about C and its variants.

I know that C++ is a higher level variant of C which supports things that C does not... i.e, object orientated programming.

what exactly is Objective C? And when compared with a program written in C how is the execution speed?
Objective-C is like C++ in that it takes the C language and adds object-oriented (OOP) features to it. However, it is very different from C++ in its implementation of those features (evidently it is closer to Smalltalk, although I'm unfamiliar with the latter). The biggest differences are that Objective-C is a relatively lightweight extension of C when compared to C++, and that Objective-C evaluates messages sent to receivers (approximately an analog to calling a method on a C++ object) at runtime, rather than making those connections at compile time.

Objective-C is the preferred language to program Cocoa applications in if you want good performance and are not building a cross-platform app. If you go through Apple's documentation on Cocoa, you'll see that the primary language discussed is Objective-C. Also, you cannot access the Cocoa frameworks directly from either C or C++ ... you would have to use some sort of a wrapper (which would undoubtedly be written using Objective-C).

I haven't done any timing, but I'd guess that for standard C constructs, the execution time of Obj-C code is essentially identical to C (and hence somewhat faster than C++). When using the Obj-C extensions, obviously it is going to be a bit slower than straight C code (just as C++ is), but you're getting the benefits of OOP in exchange.
QUOTE Thanks
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
Quote:
Originally Posted by mystic_fm View Post
I haven't done any timing, but I'd guess that for standard C constructs, the execution time of Obj-C code is essentially identical to C (and hence somewhat faster than C++). When using the Obj-C extensions, obviously it is going to be a bit slower than straight C code (just as C++ is), but you're getting the benefits of OOP in exchange.
If its similar to C++, how fast is Objective C compared with? Or does that depend on the programmer??
QUOTE Thanks
mystic_fm

 
Member Since: Mar 15, 2007
Posts: 161
mystic_fm will become famous soon enough
Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM

mystic_fm is offline
Quote:
Originally Posted by knightjp View Post
If its similar to C++, how fast is Objective C compared with? Or does that depend on the programmer??
Like I said, I haven't benchmarked them. For basic function calls and such I'd expect Obj-C to be a bit faster, but beyond that it would likely depend upon the specific types of operations being performed. Certainly C++ can perform almost as well as C or far worse than C, depending upon what you are asking of it. And it ALWAYS depends upon the programmer.

However, any decision between C++ and Obj-C should not be predicated upon performance, because there are more important factors to be considered. If you want to write Cocoa applications for the Mac, then Objective-C is the right choice, there's no question about that.
QUOTE Thanks
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
I've searched for resources online for Objective C like tutorials and stuff. But the only results I get are always assuming I have knowledge about C, which I don't. I looked for a forum, couldn't find a dedicated one like there is for C/C++.

I went Amazon and looked for books. So far, I like two books by Stephen G. Kochan "Programming in Objective-C" & "Programming in Objective-C 2.0 (second edition)".
Does anyone know which of the two I should go for??
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
Quote:
Originally Posted by knightjp View Post
I've searched for resources online for Objective C like tutorials and stuff. But the only results I get are always assuming I have knowledge about C, which I don't. I looked for a forum...
Learn C for Cocoa

That site also has some other good introductions. They may be a bit dated as far as which version of XCode they are using, since Apple has made some changes to it and IB (Interface Builder).

The most suggested book is Cocoa Programming for Mac OS X.

You can get a free Apple Developer account and get access to more tutorials and information that way.

If you haven't programmed before, then I suggest you start with a scripting language. This has been discussed here several times.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
Quote:
Originally Posted by xstep View Post
Learn C for Cocoa

That site also has some other good introductions. They may be a bit dated as far as which version of XCode they are using, since Apple has made some changes to it and IB (Interface Builder).

The most suggested book is Cocoa Programming for Mac OS X.

You can get a free Apple Developer account and get access to more tutorials and information that way.

If you haven't programmed before, then I suggest you start with a scripting language. This has been discussed here several times.
Thanks for the links. I've been to these links before and yes they are helpful, only of you are a person who used C before. Even the book you mentioned assumes that you are familiar with C/C++.
Objective-C would be my first programming language. I apologise for not mentioning that earlier....

Thats the reason I chose the books I mentioned earlier.

Once You've had Mac, you can't go back.... So very true.
If necessity is the mother of invention, she obviously never met Steve Jobs..
Julz - The Panther
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,638
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
as always, it depends on what you're doing. There are things for which perl is the way to go, others bash scripting, C, and Objective C.

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
What I've learned is, that when it comes to programming, the language used always depends on the project at hand. However, there is a underlined fact that some programmers will stick with a particular language no matter they are trying to do.

Now to the topic at hand. It is now confirmed that Obj-C is the official language for Apple development. Since it is, I've chosen it as the language I will learn for programming on my mac.
Now all I need is a good book for a programming beginner to use.

Once You've had Mac, you can't go back.... So very true.
If necessity is the mother of invention, she obviously never met Steve Jobs..
Julz - The Panther
QUOTE Thanks
mystic_fm

 
Member Since: Mar 15, 2007
Posts: 161
mystic_fm will become famous soon enough
Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM

mystic_fm is offline
I'll be honest: if this is your first foray into software development, I worry that you might be jumping in a little too close to the deep end of the pool. But if you are dead set on getting to Objective-C as quickly as possible, then I'd at least suggest that you start by just learning C first, as everything you learn there will be directly applicable to Objective-C. Perhaps someone else can recommend a good book on C for a beginner. (I learned C from the pre-ANSI K&R ... i.e., "The C Programming Language" by Brian Kernighan and Dennis Ritchie, 1st ed. ... but it wasn't my first language, and that book wouldn't be a good text to use as an introduction to programming.)

After you've learned C, Apple has a downloadable PDF on Objective-C (for C programmers) that might be helpful for you in making the transition. You'd need an Apple Developer account to get that PDF. After you understand that and some of the basic tenants of object-oriented development, you could try to get started on learning the Cocoa framework with one of the books mentioned earlier in this thread.
QUOTE Thanks
knightjp

 
knightjp's Avatar
 
Member Since: Jun 22, 2007
Posts: 290
knightjp is an unknown at this point
Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion

knightjp is offline
Thanks mystic_fm for the suggestions and concerns. In the end I went ahead and pre-ordered this book.

Amazon.com: Programming in Objective-C 2.0 (2nd Edition) (Developer's Library): Stephen G. Kochan: Books

It takes me from being an absolute beginner in programming to a pro in Objective C. The book is a updated version to include Obj -C 2.0 and includes a tutorial on developing iphone apps. I think thats a pretty good deal.

Once You've had Mac, you can't go back.... So very true.
If necessity is the mother of invention, she obviously never met Steve Jobs..
Julz - The Panther
QUOTE Thanks
mystic_fm

 
Member Since: Mar 15, 2007
Posts: 161
mystic_fm will become famous soon enough
Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM

mystic_fm is offline
Quote:
Originally Posted by knightjp View Post
Thanks mystic_fm for the suggestions and concerns. In the end I went ahead and pre-ordered this book.

Amazon.com: Programming in Objective-C 2.0 (2nd Edition) (Developer's Library): Stephen G. Kochan: Books
That does look like it has the potential to be a very good book to get you up and running to the point where you could move onto Hillegass's Cocoa Programming for Mac OS X. Good luck!
QUOTE Thanks

Post Reply New Thread Subscribe


« Pointer being cast 32-bit in function return | Entourage Help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
application-specific language selection Exolon OS X - Operating System 1 06-24-2010 12:45 AM
BASIC programming language for iMAC? CessnaFlyer Switcher Hangout 2 12-05-2008 06:28 PM
FOREIGN LANGUAGE function flips back to English for no apparent reason. MacMan7 OS X - Operating System 4 08-24-2008 03:22 PM
Programming language rated knightjp OS X - Development and Darwin 8 09-30-2007 09:37 AM
Foreign Language Support in OS X ItinitI OS X - Operating System 0 08-20-2003 11:02 PM

All times are GMT -4. The time now is 07:44 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?