The legacy of NeXT lives on in OS X

In the 1990s, Apple struggled to bring the original Mac OS—originally written in 1984 for the resource-constrained Macintosh 128K machine—up to modern operating system standards. The story of how OS X came to be is thrilling in its own right, but suffice it to say that Apple ended up buying Steve Jobs' second computer company, NeXT, and using its NeXTSTEP operating system as the basis of a new generation of Macs.

Apple announced the acquisition of NeXT on December 20, 1996, noting it wanted NeXT's object-oriented software development technology and its operating system know-how. As part of the deal, Jobs came back to Apple, eventually taking over as CEO and making the company into the consumer electronics giant it is today. Sixteen years later, several technologies developed or championed by NeXT still survive in OS X and in its mobile cousin, iOS. This week, we remember some of those technologies which continue to power key features of Apple's devices.

UNIX

We consulted several developers with knowledge of both NeXTSTEP and OS X; they universally agreed that one crucial feature of NeXTSTEP that made OS X and iOS what they are today is its underlying UNIX roots. Beneath all the slickly styled windows, icons, scrolling lists, and buttons sits a rock-solid, certified UNIX operating system.

UNIX was originally conceived in 1969 by Bell Labs' Ken Thompson for the PDP-7 minicomputer. Its development throughout the early '70s led to the development of the C programming language by Thompson's colleague Dennis Ritchie. UNIX at its core was meant to be a powerful operating system for the massive computers of the day, but it could also be easily programmed and controlled by developers using a simple video terminal.

Enlarge/ Underneath OS X's pretty graphical interface is a version of the UNIX operating system.

That same basic system powers both the Mac sitting on your desk and the iPhone resting in your pocket. By basing OS X—and later, iOS—on UNIX, Macs were finally able to enjoy important operating system features like protected memory, pre-emptive multitasking, and daemon-based services.

Graybeards may remember the days of the classic Mac OS. Some errant Photoshop plug-in could crash your entire Mac, or the Mac OS might come screeching to a halt while you dug through menus looking for some arcane command. Protected memory means that most app crashes on OS X would no longer take your whole machine down with them. Pre-emptive multitasking means that your computer could keep chugging along doing other tasks even while one application might be tied up using some of the system's resources.

With pre-emptive multitasking, UNIX-based operating systems can also use daemons, small programs that continually run in the background. Daemons sit back and wait for a signal to spring into action; they handle most of the background tasks like connecting to networked printers on your Mac or playing music while you play Words With Friends on your iPhone.

In addition, because OS X is fully POSIX-compliant—a defined set of standards that all UNIX operating systems adhere to—porting freely available tools or open source software to OS X is (relatively) straightforward. For instance, the popular FFmpeg audio/video encoder, originally developed for Linux, also powers some video encoding apps for OS X, such as Handbrake.

Objective-C

The Objective-C programming language was used to develop software for the NeXTSTEP operating system, and it carried on to OS X and iOS. It's an object-oriented programming language developed as a superset of the original C language so that both object-oriented Objective-C code and procedural C code can be combined in the same program.

Steve Jobs was a huge proponent of object-oriented programming and he largely built NeXT around giving developers tools to program in this style. At a high-level, object-oriented programming uses a set of "objects" which are defined in code to have certain characteristics and capabilities. A developer can then mix and match these objects, passing messages from one to the other in order to accomplish a particular task. Developers don't need to know the underlying code of the objects, only what messages the object responds to and what responses it can generate.

(Imagine an "adding" object that you could send a message containing two numbers; its response might naturally be the sum of those two numbers.)

While Objective-C has its detractors—mainly for its verbose, Smalltalk-style syntax—Apple has worked to improve the language by adding features like dot syntax, blocks, and automatic reference counting. The company also significantly improved compiled code by replacing the traditional C compiler gcc with Clang and LLVM. (A simple Objective-C program is below.)

Jobs said in a 1995 interview (while still at NeXT) that object-oriented development would revolutionize how we created software, compared to the previous 20 or 30 years. The developers we spoke to tended to agree that his prediction came true.

"Objective-C directly inspired Java and C# and has changed how almost everyone programs, even if they’re not writing for Apple’s machines," said developer Wil Shipley, who got his start writing software for NeXT computers. "We saw the invention of the fricking World Wide Web on NeXTSTEP. It's not a coincidence; it was a machine that was a dream to program for."

Shipley also noted that several apps we still use today on OS X were inspired by or adapted from software originally developed for the NeXT platform, including Numbers (née Parasheet), Keynote (née Concurrence), Pages, and OmniGraffle (née Diagram!).

You can see the roots of Apple's Numbers, the spreadsheet app from its iWork suite, in ParaSheet for NeXTSTEP.

AppKit framework

In addition to using the Objective-C language, NeXT also developed collections of pre-built objects which developers could use to build software. Many of these were collected in the AppKit framework, which Apple adapted into Cocoa for OS X and later into Cocoa Touch for iOS. These frameworks help eliminate some of the tedious, repetitive coding typically required in application development, letting developers focus on core functionality and usability.

Cocoa and Cocoa Touch frameworks include all the basic building blocks and functionality necessary for most modern software, but Cocoa's NeXTSTEP roots are still apparent in object class names like NSArray, which are still prepended with the "NS" prefix.

"I have always believed that if you give programmers a boost, you’re going to see amazing stuff," Shipley explained. "What would the iPhone (and iOS) be today without the SDK that came [in 2008]? I’d argue it'd just be a iPod—still a great seller, but not something that has changed every part of our lives."

Developer Mike Lee, who cut his teeth with Shipley at Delicious Monster and at Apple in Developer Relations before striking off on his own at New Lemurs, explained the connection between OS X's and iOS's UNIX underpinnings, Objective-C programming language, and Cocoa frameworks this way:

There is a relationship between most of the things listed here. The computer is UNIX, and C is the language of UNIX. Objective-C is a human-oriented language [variant], Smalltalk implemented in C. The AppKit and its Cocoa kin let us talk to the user with the same ease with which we talk to the machine. We [developers] are the diplomats between people and computers.

What I find somewhat fascinating is the way that Unix (or Unix variants such as Linux) have come to completely dominate the computing landscape. I think Microsoft is pretty much the only vendor left who is not shipping a Unix based OS. Unix dominates on servers. On the desktop only Microsoft offers a non-Unix solution (albeit one that is obviously dominant in that market). Unix via Android and iOS dominates in tablets and is rapidly coming to dominate the phone market. Yes, I'm simplifying somewhat, but the extent to which iOS, OS X and Android have expanded the reach of Unix was almost unthinkable a decade ago.

As a native French speaker, I would like to note that "neé" should be spelled "née".

(For the curious lot of you, "née" is used in marriage registers when brides change their family name: you'd see something like "Marie Jeannot, née Dupont" that meant Marie will now use Jeannot as her family name but was born with the Dupont family name. French names used for immersion.)

While I actually am a bit ambivalent towards it, didn't OSX's dock come from NeXT as well? While not the first "dock" (so I'm told), its definitely been influential.

As a Windows user at home, though? Going through the OS9 to OSX transition, reading up in why it was happening, etc., actually has given me a lot of patience for these sort of transitions because I know it'll pay off in spades if done well. So, I was patient with Vista, and I'm eagerly awaiting Windows 8 to "grow up" and mature.

What I find somewhat fascinating is the way that Unix (or Unix variants such as Linux) have come to completely dominate the computing landscape. I think Microsoft is pretty much the only vendor left who is not shipping a Unix based OS.

Wonder what the world would be like if they kept up with their version of UNIX. What was it called? Xenix or something?

What I find somewhat fascinating is the way that Unix (or Unix variants such as Linux) have come to completely dominate the computing landscape. I think Microsoft is pretty much the only vendor left who is not shipping a Unix based OS. Unix dominates on servers. On the desktop only Microsoft offers a non-Unix solution (albeit one that is obviously dominant in that market). Unix via Android and iOS dominates in tablets and is rapidly coming to dominate the phone market. Yes, I'm simplifying somewhat, but the extent to which iOS, OS X and Android have expanded the reach of Unix was almost unthinkable a decade ago.

"Those who do not understand Unix are condemned to reinvent it, poorly." Henry Spencer

There are still tons of man files from Next in OSx (atleast there was in 10.5 and below...) so many man files were so old, but the applications were newer.... that has always driven me crazy about osx....

What I find somewhat fascinating is the way that Unix (or Unix variants such as Linux) have come to completely dominate the computing landscape. I think Microsoft is pretty much the only vendor left who is not shipping a Unix based OS.

Wonder what the world would be like if they kept up with their version of UNIX. What was it called? Xenix or something?

Yep. Microsoft licensed it from SCO (remember them?). If fact, during most of the 80's, Microsoft ran on Xenix internally and the printed manuals were built on TeX.

What I find somewhat fascinating is the way that Unix (or Unix variants such as Linux) have come to completely dominate the computing landscape. I think Microsoft is pretty much the only vendor left who is not shipping a Unix based OS. Unix dominates on servers. On the desktop only Microsoft offers a non-Unix solution (albeit one that is obviously dominant in that market). Unix via Android and iOS dominates in tablets and is rapidly coming to dominate the phone market. Yes, I'm simplifying somewhat, but the extent to which iOS, OS X and Android have expanded the reach of Unix was almost unthinkable a decade ago.

Blame GNU. If Linus had to develop a brand new userland and utilities for Linux, it would never have caught on.

As a native French speaker, I would like to note that "neé" should be spelled "née".

(For the curious lot of you, "née" is used in marriage registers when brides change their family name: you'd see something like "Marie Jeannot, née Dupont" that meant Marie will now use Jeannot as her family name but was born with the Dupont family name. French names used for immersion.)

Blame GNU. If Linus had to develop a brand new userland and utilities for Linux, it would never have caught on.

This significantly overstates GNU's necessity, as there were open source BSD implementations around at the same time. (The various BSDs are still used quite a bit in servers, even if they're not as popular as Linux. When I go looking for drivers for RAID cards, I always see the BSD versions hanging around too.)

Automator is probably the awesomest most underrated thing in OSX in combination with Services. You cna create an automator script then add it to you services menu to do some pretty cool things that woudl otherwise require an app or tedious workflow to do.

Yeah- Objective C is pretty cool. It's amazing all the extra flexibility a little reflection gives you in a language. I find that NSClassFromString and NSSelectorFromString can really simplify a project if you use them judiciously.

NeXT was in many ways an Apple spinoff like Claris or Kaleida, just one that was not sanctioned and happened to be headed by Steve Jobs. Jobs stated in interviews in the 80s that he hoped that what NeXT produced would eventually come to be used by Apple. The official Apple channels couldn't produce a next-generation Mac OS, so the rogue NeXT team had to fill the vacuum. Just like Jobs's band of pirates saved the company after the flops of the designed-by-commitee Apple III and Lisa.

I still would love to get a Mac at some point, at least for this reason. I never actually owned a Mac even though I have had a soft spot for them for quite some time.

While I got rid of my Mac not all that long ago, they're great machines overall, and resell pretty well. Very nice laptops, and if/when I get another one, chances are I'll forego the desktops entirely and go that route.

For the time being, I'm content just to use Macs at work, and keep Windows/PCs for my personal use. Separation of Work and Play, you know?

This significantly overstates GNU's necessity, as there were open source BSD implementations around at the same time.

At the time when Linus was getting things under way, the BSDs were mired in lawsuits. They existed, but GNU offered everything, libc, compiler, shells, ready to go with a bit of porting and a fairly straightforward license. I don't believe things were quite so clear on the BSD front, certainly the legal matters hadn't been resolved yet.

Back on topic, I enjoyed working with OS X and Apple's development tools back in 2006-2007 when I got my 2006 black Macbook. It served me well through the last year of my degree (nothing quite like having GCC, Bash, and all the other tools I needed on hand) and the system itself lasted until this year, just shy of six years. Unfortunately I won't be walking back into the Apple camp any time soon.

I still think services/intents/contracts are one of those OS features that should really get more developer use. If everything used them we'd have near-fictional quality software that talked to eachother instead of forcing us to be the go-between.

I think one thing which is interesting with Apple and NeXT is that despite Apple's reputation for always coming up with something new and not caring about backwards compatibility, the fundamentals of OS X is less changed than the fundamentals of any other popular OS.

If you brought a NeXT developer from 1989 to 2012, and asked him to work on a typical OS X app, it would probably not feel all that different to him. Now compare that to Linux or Windows. When I started playing around with Linux it was a Motif clone which was what was most widely used GUI toolkit, and you would likely program in C. Today you will probably use C++ and Qt or perhaps gtk with python bindings. The IDE used would be quite different. Although Emacs and vim are still videly used so there is some continuety there.

On windows it has been even more dramatic changes. Someone coming from 1989 programming Win16 and in C, would probably be quite confused by C#, Silverlight etc.

The desktop metaphore has also gone through several itrations of changes from Win3.11 to Win95 to WinXP to Windows 8. The major difference between OS X and NeXTSTEP on the other hand seems to be the visual style, single line menu bar at the top and a desktop you can put files on. The rest seems like tweaks and addons, seen from the outside. Obviously a lot of work has happened under the hood.

IMHO this all speaks a lot about the quality of the design of NeXTSTEP both from a user interaction point of view and from an API point of view. That is has been able to age so gracefully.

The official Apple channels couldn't produce a next-generation Mac OS, so the rogue NeXT team had to fill the vacuum.

If Jean-Paul Gasse had agreed to a price of $200 million ( instead of $275 million ) for Be Inc., Macs would be running BeOS and OS/X would have been a footnote to history along with Next's two scale salaries($50k or $75k) and use of magneto-optical drives instead of hard drives.

I used to think that as well, but it is easy to forget that there was a lot of areas where BeOS fell short of NeXTSTEP. I think there are several areas where NeXTSTEP was better thought out.

1. Display system. Vector graphics at the core.2. Bundle system for applications and documents.3. Objective-C instead of C++ for app development. Now I am not saying Objective-C is better than C++. But they do have different strenghts and weaknesses. Objective-C is IHMO much better suited for GUI application development, since its dynamic nature makes it easy to glue together UI and business logic easy. This has never really worked out well in C++. The only toolkit which is okay to use is Qt, but that is mainly because of the moc compiler, which in a lot of ways have given Objective-C features to C++.

Secondly it Objective-C has been much easier to deal with with respect to versioning and ABI compatibility. One has never had to deal with the DLL hell of windows.

4. Pervasive multithreading in BeOS was the wrong approach to concurrency and made programming much harder. Grand Central Dispatch is a better approach, and before that multiple processes with IPC mechanicsm.

But I agree I sort of miss the translators in BeOS and how they used extended attributes. E.g the email program was pretty cool in how it utilized that approach. But I am not sure how much this mattered in practice. The Apple approach of showing data in specialized applications such as iPhoto and iTunes seems to have worked quite well.

The official Apple channels couldn't produce a next-generation Mac OS, so the rogue NeXT team had to fill the vacuum. quote]

If Jean-Paul Gasse had agreed to a price of $200 million ( instead of $275 million ) for Be Inc., Macs would be running BeOS and OS/X would have been a footnote to history along with Next's two scale salaries($50k or $75k) and use of magneto-optical drives instead of hard drives.

NeXT stopped using magneto-optical drives after the first NeXT Computer, later computers like the NeXTcube and NeXTstations (and Turbo editions) had internal hard drives and 2.88 MB floppies.

If Jean-Paul Gasse had agreed to a price of $200 million ( instead of $275 million ) for Be Inc., Macs would be running BeOS and OS/X would have been a footnote to history along with Next's two scale salaries($50k or $75k) and use of magneto-optical drives instead of hard drives.

And Steve Jobs wouldn't have come back to Apple, and quite possibly *Apple* would be a footnote to history. The tech world would be very different.

Would make an interesting (and highly nerdy) piece of alternate-history fiction.

The reason I was originally interested in OS X back in the early part of the century was because it was based on Unix. I got my hands on a G3 PowerMac and spent a lot of time in Terminal. When my Windows machine got long in the tooth I switched over to Mac. Now I get to make a living as an OS X programmer. I still spend a lot of time in Terminal.

My biggest gripe with OS X lies in the text services, which seem to have remained almost untouched for a decade. With its rulers and text crudely defined by fonts and font sizes, OS X remains mired in the text-processing world of the early 1980s and WordStar.

Apple needs to dramatically improve its text services, so text apps can put paper aside and move into the digital age. Specifically, it should:

* Include named paragraph and text styles as a basic part of text handling. Knowing that a body of text is a first level heading or a particular word is to be italicized (whatever the font), is a key factor in displaying the same document on a 27" iMac, a 10" iPad, or an iPhone.

* Build ePub into OS X and iOS as throughly as PDF is built into almost every OS X app.

* Create an almost effortless way to transfer documents across OS X and iOS devices. And I'm not talking about iCloud synching, which has to be set up and syncs perhaps more than users want. I'm talking about a File-Digital menu item in OS X that includes "Send to my IPhone" and even user-created options such as Sent to Bob's iPhone. We shouldn't have to klutz with email or USB cables.

* GREP in InDesign is a delight, but it's only in InDesign.Create a system-wide GREP for all text apps. Make one that'd share the same set of S&Rs and make exchanging those sets so easy, most users would not need to know GREP encoding to use them. Many office workers spend too much time making changes that could be easily handled by GREP.

Most of those who use their makes for work, spend a lot of time working with words. Apple has spent huge sums refining play-toy apps like iTunes. It needs to do something similar for text.