Emacs is not an OS, it is an app platform
In brief:
An operating system (OS) is a piece of software that provides a consistent set of functions and data that make abstract (hide) the details of the computer hardware on which it runs, and manages the limited resources of the computer hardware, especially the memory (volatile or otherwise), the computing time, and the peripheral hardware like user input, displays, sensors, etc. An app platform is a piece of computer software for developing software applications, typically a graphical user interface, connected to some underlying computing logic, which runs on top of one of more OSs, and provides a consistent appilication programming interface (API) that abstracts the details of the underlying OS away such that a single software application can run with the same behavior on any OS and any computing hardware.
Before the turn of the century, computer hardware and operating
systems were basically inseperable. You always bought both together,
and both together created the platform
upon which 3rd-party
software products, like business applications or games, could be
developed and sold. But since Web 2.0,
roughly since
eminently useful HTML version 5, and the powerful JavaScript 5
standard, both released around the year 2010, computer hardware and
OS's have become more of a commodity: it doesn't matter which system
you use as long as it runs a web browser.
With the Web (often mistakenly called the Internet
)
everyone can use the same apps as everyone else, no matter what
computer anyone chooses to use. But the Web is not the only app
platform: Microsoft has .NET, Apple has an app platform that runs on
Mac OS and iOS, Android has it's own app platform that is built on
top of Linux OS, and Java is an alternative app platform that works
on many OSs.
And Emacs, I would argue is another app platform, just much lesser known. Though many people think of it exclusively as a text editor, which originally it was for that purpose, Emacs actually has it's own programming language (Emacs Lisp), it's own unique way of programming user interfaces, and these user interfaces let end users access the computing logic on your OS, just like any of the above mentioned app platforms. This explains why Emacs seems to be able to do everything -- well, that is because it has it's own built-in programming language. And text editing is just one of it's many built-in apps.
How is Emacs an operating system?
There is a really old joke about Emacs, I don't know who first said it:
Emacs is a great operating system, lacking only a good text editor.
This is funny because Emacs is supposed to be a text editor, at
least, that is what it originaly was back in the 80s when it first
came into common use, and even today most professionals would
describe Emacs as an editor.
But to the casual observer
looking at all the features Emacs provides, it seems to have
everything but a text editor, and the text editor it does have is
essoteric and can be hard to use for first-time users. The features
you get with Emacs include:
- a file browser
- a mini web browser
- an e-mail client
- an IRC chat client
- a terminal emulator
- a personal organizer, mind mapper
- a calculator and and computer algebra system
- a built-in Lisp interpreter
- a number of games
- an app store
- and much, much more! Over 5,000 apps to choose from!!!
Note: please do NOT quote me on that 5,000 number, I am
just mimicking a dishonest salesman, but I based that number on
roughly how many downloadable app packages you can find in
the app store,
many of which are code libraries and not
apps.
An outdated joke
Emacs has been around since roughly 1975. In the 35 year span fom
then up until the time the Web took over the world in 2010, there
was really not much difference between an OS and an app
platform. You had a several choices of OS: CP/M, MS-DOS, Commodore
OS, Macintosh OS, or if you were very rich, or else a computer
science major at a big university, you could use UNIX. For each
operating system, a software company could write software, but the
software wouldn't run on other OSs -- the OS was the foundation on
which the application was built, and you can't easily move things
that rest on a foundation. Still, often times app developers wanted
to sell to customers who were using different OSs, so they would
have to port
their software to other computer platforms,
which was extremely labor intensive and costly.
But technology tends to improve over time. In the 1990s, Sun
Microsystems released Java, arguably the first commercial app
platform, certainly the first very successful one. It ran on all
major operating systems. The business plan was that Sun would invest
in the capital cost of porting the app platform to every operating
system, but the application programming interface (API) would be the
same on every platform. Therefore app developers could buy Java,
write the app to run on Java, and their app would run on any
OS that Java supported. Write once, run anywhere,
was the
slogan. For the first time, app developers could outsource the cost
of porting to Sun Microsystems, and could write apps that targeted a
huge market of users across all OSs.
The rest is history, really. Except JavaScript on the Web would eventually take over, surpassing Java and all other app platforms, as the dominant app platform. This was because it was an open standard -- no one company owned it, so many companies could collaborate on development, and in principle anyone could develop their own Web browser for running apps. Today there are still many other app platforms, like Android, iOS, and .NET, which offer better integration, and a better user experience, on the OSs to which they are tied. But app developers don't really have to choose nowadays, they can just write an app for the Web, and worry about making, Windows, Mac, Android, or iOS specific versions of their app after they get rich.
What does that have to do with Emacs?
Well, Emacs followed a very similar path that the Java app platform did. Like Java and the Web, Emacs was originally developed for UNIX, and it was then ported to Linux, Mac OS, and Windows. And like Java, it runs a programming language (Lisp), and can be used to develop apps. Unlike Java or the Web, it was never really made to do graphical user interfaces, so (also unlike Java or the Web) it was never commercialized or taken seriously as a platform for business applications. It was just a tool programmers used, and they could get it for free. The developers were all volunteers, the end users were all just other computer geeks who would sometimes write little scripts and toy programs that they would share with each other. Those users with professional software engineering experience could write high-quality Lisp apps for Emacs that genuinely made Emacs more useful and more powerful. Over 45 years of gradual but continuous development, the Emacs community now has an Emacs Lisp app for nearly any purpose a (mostly) non-graphical app platform could possibly need.
A comparison of app platforms
How does Emacs compare to other app platforms? Here is my table of the features that all have in common:
- Faces end-users with a user interface. This excludes LLVM.
- Has one or more
app stores
or package repository where you can download new apps and upgrade existing apps. - Apps are programmed in a high-level language that compies to byte code to better isolate apps from the OS. This excludes Qt, though Qt very nearly meets my definition.
- Byte code can be JIT or AOT compiled.
- Can be targetted by third-party programming languages.
- Runs on multiple OSs. This excludes Android, Mac OS,
iOS, but not .NET since a scaled-back version of it called
Mono
runs on Linux and UNIX. - Have a protocol for back-end application logic. Platforms that communicate directly with the OS use POSIX system calls as their protocol. This excludes the now defunct Adobe Flash, and Microsoft Silverlight.
Platform | Proprietor | Language | AOT/JIT Compiler | Back-end | App stores | Major use cases |
Emacs | GNU community* | Emacs Lisp | libgcc | POSIX, X11 | ELPA, Non-GNU ELPA | document editing, software development, PIM, research science, small-scale application deployment |
World Wide Web | WWW Consortium* | JavaScript, WebAssembly | V8, SpiderMonkey | HTTP(S), QUIC | any HTTP server | consumer apps and games, social networking, office software (home, commerce, government), small and large-scale application deployment. |
Electron | The OpenJS Foundation* | JavaScript, WebAssembly | V8 | HTTP, POSIX | NPM, Unofficial App Store | consumer apps and games, social networking, office software (home, commerce, government), small and large-scale application deployment. |
.NET | Microsoft | C# | .NET Runtime, R2R | POSIX | Windows App Store, Chocolatey | consumer apps and games, office software (home, commerce, government), small and large-scale application deployments |
Java | Oracle | Java (PL) | JVM, Graal VM | POSIX | HPC, IoT, big data, large-scale application deployment | |
Erlang | Ericsson | Erlang (PL) | BEAM | EPMD, POSIX | IoT, telecom, public infrastructure, high-availability systems | |
R | R Foundation* | R (PL) | {jit} , {compiler} |
POSIX | HPC, big data, research science |
* means not privately owned
(PL) means, programming language,
for when the app
platform has the same name as the programming language.