1

I was curious what language the default binaries and system binaries that come with macOS are written in. I am sure it's not just one language, but is there one language that is common throughout most of these binaries that come with the system?

  • 1
    The binaries in /bin and /sbin are typically written in C however, you can look for yourself at: opensource.apple.com – user3439894 Aug 24 '18 at 5:11
1

macOS is built on BSD which is a Unix like operating system.

The Unix operating system and the C language were created simultaneously. Many of the commands have evolved over time but usually have remain written in the C language. The libraries and the Unix operating system is also written in C.

The C language is probably the closest high level language that actual resembles machine instructions. This allows Unix to be ported to new processor architectures with minimal effort. In other words, the optimizations were originally provided by the author's of the code and did not rely on compiler specific optimizations with respect to a particular processor architecture.

Note: Gordon Davisson has pointed out in a comment:

... macOS includes a lot more than just its Unix core, and a lot of the Apple-added software is written in other languages, like Objective-C, Swift, and a plethora of other languages.

  • 1
    You're confusing unix (which was created simultaneously with C, and which macOS is based on) with Linux (which is a mostly-clone of unix, written much later). If you replaced "Linux" with "unix" throughout your answer, it'd be mostly correct; as it stands, it's completely wrong. But I'd also point out that macOS includes a lot more than just its unix core, and a lot of the Apple-added software is written in other languages, like Objective-C, Swift, and a plethora of other languages. – Gordon Davisson Aug 24 '18 at 7:15
  • @Gordon Davisson: Sorry for the mistake. Just tired I guess. I made the Unix correction. I understand Apple added software to create macOS, but the OP referred to the bin and sbin directories. If the OP had not referred to those specific directories, then I agree you would be right. – David Anderson Aug 24 '18 at 7:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .