Nepedia
Back to Discover
Fluent Reader
💻

Objective-C

technology Maturity 7-9 Next article →

Objective-C is a special language used to give instructions to computers. It is a high-level language, which means it is designed to be easy for people to read and write. This language is very useful because it is object-oriented. This means it organizes code into "objects" that can work together. It also adds a special way of working called messaging to an older language called C.

This language works through a process called message passing. In many other languages, you tell a piece of code to run a specific task. In Objective-C, you instead send a message to an object. The object then decides how to handle that message while the program is actually running. This makes the code very flexible. For example, you can send a message to a group of objects even if some of them do not know how to answer.

Two men named Brad Cox and Tom Love created Objective-C. They began their work in the early 1980s at a company called Productivity Products International. They wanted to make it easier for programmers to reuse their work. Cox was inspired by a language called Smalltalk. He wanted to combine the power of Smalltalk with the C language. This way, engineers could keep using what they already knew while gaining new tools.

Objective-C became very famous because of a company called NeXT. NeXT used the language for its NeXTSTEP operating system. Later, Apple purchased NeXT in 1996. Because of this, Objective-C became the main language for Apple's macOS and iOS systems. This helped developers build the apps we use on iPhones today. In 2014, Apple introduced a new language called Swift to help developers even more.

When you write in Objective-C, you use two different types of files. The first is a header file, which usually ends in .h. This file acts like a list that shows what an object can do. The second is an implementation file, which usually ends in .m. This file contains the actual instructions for the tasks. It is like having a menu that tells you what food is available, and then having a kitchen that actually cooks the meal.

367 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.