2 ms·
> Isn't Swift just a mac thing? no https://www.swift.org/install/linux/#platforms https://www.swift.org/install/linux/#platforms > Also note that text editor
by lispm 2y ago
> Isn't Swift just a mac thing?
no
https://www.swift.org/install/linux/#platforms https://www.swift.org/install/linux/#platforms
> Also note that text editors really thrive on specialized string representations
No, it needs specialized editor data structures.
The first Emacs was originally written in 1976 by Guy L Steele and David Moon on top of TECO, an early text editor with a cryptic macro language. Richard Stallman did most on the early work on it.
The second Emacs was written for the then new MIT Lisp Machine in Lisp, in 1978 by Daniel Weinreb and Mike McMahon. The Emacs was called EINE.
The third Emacs was Multics Emacs, which was written in Maclisp, in 1978 by Bernard Greenberg.
One can implement editor data structures in Lisp, as was shown already way back then.
Gosling Emacs was written in C with Mocklisp, 1981. Richard Stallman took it and rewrote it into GNU Emacs.
GNU Emacs is implemented on an Emacs Lisp engine written in C, with various low-level stuff implemented in C.
The main reasons to use C for low-level stuff:
C is already a low-level language, which makes integration with various operating systems simpler.
C can be compiled to native code and will generate fast executable code.
Emacs Lisp OTOH was implemented as an Lisp interpreter and a byte code engine (byte code interpreter in C and byte code compiler in Lisp). Writing portable code is easy, but without native code it is not that fast, when the code is actually written in Lisp. Slower Lisp code calling faster C code for the performance critical sections then usually works. Also the compact byte code made the implementations slightly smaller, compared to native code.
Other Lisp implementations (like Lisp Machine Lisp and Maclisp, both from the 70s) already had faster implementations. The Maclisp compiler was producing native code.
The other reason why Stallman implemented Emacs Lisp: he wanted a simpler Lisp, because GNU Emacs was supposed to be configured/extended by people who are not hardcore Lisp experts.