OS Overview - NeXTSTEP & macOS
NeXTSTEP
This is where it all began, the NeXTSTEP operating system. This is where XNU, Darwin, macOS, iOS etc all came from, and it's also the reason every Objective-C library starts with NS, even the new ones. NeXTSTEP OS was released on September 18, 1989 (28 years ago) and was a UNIX-like operating system written in Objective-C and C. It's kernel was, much like XNU, a combination of Mach and BSD. This formed the base for XNU. Some of the applications still in macOS today are descendants from the NeXTSTEP OS, these include TextEdit, Mail and Chess. The last release of NeXTSTEP was 4.2 Pre-release 2 on September 1997.
NeXTSTEP formed the base for XNU, Darwin, macOS, iOS, watchOS and tvOS. Without it, things would be very different today.
macOS
macOS was originally called system and stayed this was for 7 versions (System 1, 2, 3 etc). After System 7 the name was changed to Mac OS and continued the numbered names. Once it reached Mac OS X (or 10) the name was kept as that Mac OS and Apple began release 10.X versions, also code naming them after big cats, and more recently landmarks in California. Mac OS. The initial release of "Modern" macOS was March 24, 2001 and was named "Mac OS X". macOS is mostly closed-source, although some components, like Darwin, are open-source. macOS is based on UNIX and is POSIX compatible, but has never been officially certified.
macOS uses a design system called "Aqua" and was created in 2000, just before the release of macOS 10.0 and is the successor to Platinum, which was used in Mac OS 8, 9 and Mac OS Server 1.2. Aqua is written in C++ and In 2014 Aqua was updated to match the design theme of iOS 7.
macOS was originally wrote in C and Objective-C, however, with the release of Swift, some major components of macOS have been rewrote in Swift, these include the Dock for example. We can check if a application is built with swift by running an object dump
$ objdump -t /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
After entering this command you will get ALOT of output, to see if the application is in Swift, or at least has some parts of it in swift, then you'll see something like the following.
0000000000000000 *UND* __swiftEmptyArrayStorage
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftCoreGraphics
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftCoreImage
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftDarwin
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftDispatch
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftFoundation
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftIOKit
0000000000000000 *UND* __swift_FORCE_LOAD_$_swiftObjectiveC
0000000000000000 *UND* __swift_allocObject
0000000000000000 *UND* __swift_deallocObject
0000000000000000 *UND* __swift_dynamicCast
0000000000000000 *UND* __swift_dynamicCastClass
0000000000000000 *UND* __swift_getEnumCaseSinglePayload
0000000000000000 *UND* __swift_getExistentialTypeMetadata
0000000000000000 *UND* __swift_getGenericMetadata
0000000000000000 *UND* __swift_getInitializedObjCClass
0000000000000000 *UND* __swift_isUniquelyReferencedOrPinned_nonNull_native
When it comes to security, something that is spread a lot is "Macs cannot get viruses". This couldn't be further from the truth. Of course macs can get viruses, they're just less common. Because less people use macs attackers don't spend as much time trying to target macOS like they do with Windows. Although anti-virus is something that is still recommended for macs, it's not as serious to have like Windows. macOS is also following the path of iOS with security features that are increasingly hard to get past and systems that prevent against attacks that try to modify important system files (System Integrity Protection).
Summary
I hope you've learnt a lot about macOS and NeXTSTEP in this section, i certainly did. There will be many more changes to macOS to come, including some references to ARM in macOS specific components in XNU.