|Feb 1, 2013, 08:14 PM||#1|
C, Obj-C, C++, some questions argh
After searching Google and this forum I have still not been able to fully find the answer.
As of now though I intend to write programs for iOS (I have some ideas) and later OS X if I think of anything.
Currently reading Objective-C Programming Big Nerd Ranch Guide. When I'm done I will hopefully have a good understanding of C and Objective-C after reading the advanced parts.
So far I'm still on Command Line Tools. I know you can select C++. I was wondering though that since you need Objective-C for Cocoa (from my understanding), what would C++ be used for? At least for iOS and OS X. I've seen someone say that it's a good compromise. Not entirely sure for what though.
Whatever language I learn next though, will most likely be dictated by what I want to program for next. I do wonder when I'll actually use C but understanding it will be quite helpful.
|Feb 1, 2013, 09:14 PM||#2|
C++ when used with restraint and some sense is a better programming language than C. If you use code written by others, especially if it is supposed to be portable between different operating systems, chances are it is written in C++.
In a MacOS X or iOS applications you can freely mix code written in C, Objective-C, C++ and Objective-C++.
|Feb 1, 2013, 09:55 PM||#3|
That clears it up. Thanks. Since as of now I'll only be writing for iOS and OS X I think it'll be mostly written in Objective-C. Maybe some C, depending on what I need. Since I don't know C++ the other two are ruled out. Until I learn it at least.
Although, depending on the program, wouldn't C++ be better most of the time? Since it is object-oriented? I'm probably way off since there is probably more to it but I'll learn.
|Feb 1, 2013, 11:49 PM||#5|
Exploring many languages is a good way to expand your horizons, particularly ones that are very different from each other (procedural, functional, object-oriented, etc...). Takes a long time though.
|Feb 2, 2013, 11:16 AM||#7|
My take on this.
The "best" language to use depends on what "problem" you are trying to solve.
If the "problem" is to write an application on IOS, the only language really useful is Objective-C. And you need to work with objects and learn some object oriented programming, as it is the basically the only way to do things on IOS.
Same language, Objetive-C, if mainpart of your program is about showing windows and menus and such stuff on Mac OS.
But on Windows, Objective-C is not a viable option. You need to write your program in a different language. Often C# or (ahem, clearing my throat here) Basic, as in Visual Basic .Net. Had to make a slight noise here as "real" programmers don't eat basic.
On some platforms, say an Android smart phone, the language of choice would probably be java.
If you do very large simulations or stuff like that, say forecasting the weather, you might use C or C++ but with additions allowing the program to be run concurrently on a a large number of computers (this is a special world in itsel).
But on a a web server neither languae is a good choice. There you would probably use something like PHP instead.
The real interesting stuff (at least I think so), happens when you want to share code base between different environments. This is definitely not a beginner subject. Then you migh want to write the logic stuff in C++, and have one graphic front-end for Mac written in Objective C, a different front end for Windows written in C#.
If you like really small computers, say for controlling a robot, C is probably the choice language.
So, to make it really short. If you like you mac and ios stuff, learn objective-C really good. Knowing one language really well will help you learning the next language. Knowing a lot of languages only on the surface might be interesting, but does not really get you into programming.
|Feb 3, 2013, 05:23 PM||#8|
When writing Objective-C code for IOS especially, and mostly when writing for Mac OSX, do use Xcode. Yes, xcode does a lot of magic, but it is exactly the kind of magic you need to get the code running on IOS.
If you learn objective-C well you will learn a lot of useful things. Most of these will travel with you to other languages and other environments, some will not. One of the things that will travel is the object oriented concept of MVC, which is more or less compulsory on IOS. You will find something similar in all GUI type frameworks regardless of programming language.
Once you have written your first few IOS programs (not book or class assignments) and your first few Mac OSX programs, you might want to look into other languages. That day is not now.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Learning Obj-c feedback||arkmannj||iPhone/iPad Programming||11||Apr 25, 2014 12:22 AM|
|What to learn aside Obj C||Will0827||iPhone/iPad Programming||8||Sep 27, 2012 04:07 PM|
|Argh IR and options||Engali||MacBook Pro||1||Sep 22, 2012 02:13 PM|
|ARgh - 4s or wait||sdmfer||iPhone||19||Jul 11, 2012 01:53 PM|
|Need help with indexing (Java or Obj-C)||iVikD||Mac Programming||5||Jul 5, 2012 06:43 PM|
All times are GMT -5. The time now is 11:03 PM.