Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Finally, the course compares how code is written in several different languages, the libraries and frameworks that have grown around them, and the reasons to choose each one.
Objective-C is one of the older languages on the list. Invented in the early 80s as an object oriented version of C, it really is the C language with some extra stuff added to it. That extra stuff makes it object-oriented. The way it's used these days one of the benefits of using Objective-C is it comes with a large library referred to as Cocoa which we will talk about in a moment. It is a compiled language. Not interpreted and not one that uses intermediate bytecode.
And although, it's a high-level language, it is one where you need to be a bit more aware about memory management than things like Java or the .NET languages. It uses something called reference counting, where we keep track of the objects that we create and whether we're done with them or not. Although advances in the language means that this is becoming less and less of an issue, but because of that I wouldn't say it's a particularly friendly language for beginners. You really need kind of an intermediate level of skill to be messing with Objective-C.
However, you maybe highly motivated to do this. Because one of the reasons that Objective-C has grown enormously in popularity is that this is the language we use for Apple development, whether that's iOS development like the iPhone or the iPod or a Macintosh desktop development. And it's the language that was used to build the OS X operating system or at least large parts of it. So it's not going anywhere anytime soon. So here is the question: what does it look like? Well, as the name might suggest quite close to C. We have the curly braces, we have the semicolons at the end of the line.
However, it's one of the stranger looking languages, because there are a quite a few things that aren't shared across other languages. We still have the main section which is denoting where our program begins. But while you'll see are a lot of words that begin with NS everywhere and this is really an old history lesson. Objective-C was used by the company NeXTstep to build their operating system and when that was bought by Apple, it brought a lot of that with it. So when you see example programs written in Objective-C, you will often see this NS letter all over the place.
You will also see a lot of square brackets being used. Now usually we'd assume they were denoting arrays, but here that's not the case. Because Objective-C is actually built on top of the C language and what I mean by that is not influenced by C. It is C with extra stuff. The way that we start to use the object- oriented features is we have to mark them out by using things like square brackets. So Objective-C can look a little strange to people used to other languages.
Another odd feature is it's very common to see the @ sign in front of a string. And that's how we actually tell Objective-C that we are working with a string object in that language. And like C we also have a lot of import statements. One of the powers of using Objective-C is we can link to a whole bunch of big libraries full of interesting code that we can get access to. Because Objective-C has been used so long by Apple, they've built enormous amounts of pre-written code that we can used to build Macintosh desktop applications, iPhone applications, and these are wrapped up under the general name of Cocoa.
And if you're interested in getting started with this language, well, there is one key editor or IDE and that is XCode. That is Apple's own integrated development environment for building desktop applications or iPad or iPhone applications or even just simple command line applications. And because this is so Apple oriented, not surprisingly the one key website here is developer.apple.com. This is where you'll find downloads, reference guides, tutorials, and a lot of information about getting started with Objective-C.
If you're interested in writing applications that run natively on Apple hardware, this is the language you want to be looking at.
Find answers to the most frequently asked questions about Foundations of Programming: Fundamentals.
Here are the FAQs that matched your search "":
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.