| OS X - Development and Darwin Discussion and questions about development for Mac OS X. |
| View Poll Results: The Best Programming Language | |||
| Applescript |
|
1 | 10.00% |
| C |
|
4 | 40.00% |
| C++ |
|
1 | 10.00% |
| Java |
|
4 | 40.00% |
| Perl |
|
0 | 0% |
| Assembly |
|
0 | 0% |
| Voters: 10. You may not vote on this poll | |||
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
|
| QUOTE Thanks | |
![]() Member Since: Mar 09, 2004
Location: Munich
Posts: 9,075
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
|
|
| QUOTE Thanks | |
![]() Member Since: Sep 19, 2008
Location: Nottingham, UK
Posts: 302
![]() Mac Specs: 20" iM ac,13.3" Aluminium Unibody Macbook, iPhone 4
|
Thanks, Eddie Software Engineering Student, NTU |
| QUOTE Thanks | |
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
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 | |
![]() Member Since: Mar 15, 2007
Posts: 161
![]() Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM
|
Quote:
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 | ||
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
Quote:
|
|
| QUOTE Thanks | ||
![]() Member Since: Mar 15, 2007
Posts: 161
![]() Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM
|
Quote:
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 | ||
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
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 | |
![]() Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
|
Quote:
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 | ||
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
Quote:
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 | ||
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,511
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
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 | |
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
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 | |
![]() Member Since: Mar 15, 2007
Posts: 161
![]() Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM
|
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 | |
![]() Member Since: Jun 22, 2007
Posts: 260
![]() Mac Specs: Mac Mini Core 2 Duo w/ 4GB ram running OS X Lion
|
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 | |
![]() Member Since: Mar 15, 2007
Posts: 161
![]() Mac Specs: 17" MacBook Pro, 2.33GHz C2D, 2GB RAM
|
Quote:
|
|
| QUOTE Thanks | ||
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
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 03:53 PM.
Powered by vBulletin