which language is used to creat mac os?
C, mostly. Almost every operating system is based in C. However, I'm not sure what language the developers have used on top of that to create the user interface.
The kernel of Mac OS is based on OpenBSD which is a flavor of Unix, as such it is written in C. Which was the primary reason for the development of the C language, ie to write Unix. Other languages are used on top of it to make the different applications depending on the preference of the programmers. C is typically used to create operating systems because it is able to produce code that is more efficient than say an object oriented language that has to do multiple lookups to access information. Assembly is even more efficient than C; however, the detail that is required in assembly means that you have to write a lot of code just to do simple operations because the computer can operate on simple operations. Hopefully that makes sense. C allows one the ability to do elementary operations like assembly does, but also allows you to use more complex operations which can be easily converted to assembly like operations. Other languages, like object oriented languages, tend to have additional features that make them less efficient than C. For example, in C the programmer is expected to release memory that he/she uses when he/she is done with it, whereas in Java, the programming language keeps track of when memory is no longer used and that memory is freed during a garbage collection phase. Which means that in Java a programmer doesn't need to worry about freeing memory, but in C you have to explicitly state when memory is to be freed. Thus Java makes it a lot easier for the programmer; however, this comes at a price as Java has to keep track of which memory is being used and what memory isn't being used. For a typical program, Java or other languages like it are fine, they speed program development and the loss of efficiency isn't really that important. For operating systems though, since every operation that is done on the computer has to work through the operating system in one form or another, having an in-efficient operating system will slow down everything else and so efficiency is more important.
Hello Mspk, Actually the Mac OS X is created using a Hybrid Kernel. It is known as XNU Kernel. The programming languages used are C & C++. However most of the user tangible interfaces and programs are largely developed usin Objective C. This language has it's roots in the NeXT Operating System developed by steve job's company during his exhile from Apple. Hope this helps. I am currently an Employee at Apple. Have a great day ! Bye :)
Thanks for the correction pjrocks2, I'll go take a look.
Nice one folks, really good answers.
Join our real-time social learning platform and learn together with your friends!