4 ms·
> My only wish is that emacs were written in an even better language than elisp (like Common Lisp) There are a lot of bad things in CL too, unfortunately. I wo
by ealhad 8y ago
> My only wish is that emacs were written in an even better language than elisp (like Common Lisp)
There are a lot of bad things in CL too, unfortunately. I wonder if a Lisp will become really popular in the near future. Maybe Racket?
- lispm 8y agoThere are 'bad things' in any programming language. Common Lisp is actually quite a bit more advanced out of the box than Emacs Lisp: lexical binding, excellent error handling, good support for compilation, extensive object-oriented features, it has multiple implementations with independet code bases, implementations with threading, ... CL has been used to develop Emacs editors already. But the thing is a non-starter. There are a few million lines of Emacs Lisp for a specific editor, which nobody will rewrite.
- rauhl 8y agoEmacs Lisp has lexical binding these days. I’d like to see an Emacs with a Common Lisp core, and an elisp execution engine to run all the legacy elisp code. https://github.com/blindglobe/clocc/blob/master/src/cllib/elisp.lisp https://github.com/blindglobe/clocc/blob/master/src/cllib/el... looks like a decent first start, although it supports an older version of elisp. Someday if I have the free time I’d love to spend time working on such a thing. Maybe when I’m retired!
- lispm 8y ago> Emacs Lisp has lexical binding these days sure, but you need to support legacy software, too. Which is most Emacs Lisp ever written.
- ealhad 8y agoOf course CL is more advanced than Emacs Lisp, it's a very interesting platform! I have grown tired of some of its aspects though, like those endless lists of possible keyword arguments. But this is just me nitpicking about elegance.
- lispm 8y agoRichard Stallman doesn't like that either. There is no support from him for a CL version. There never was. It's nothing the core developers of GNU Emacs are interested in. But if we look around - most alternatives have their variants of keyword alternative mechanisms. Racket: https://docs.racket-lang.org/guide/lambda.html https://docs.racket-lang.org/guide/lambda.html Guile: https://www.gnu.org/software/guile/manual/html_node/Coding-With-Keywords.html https://www.gnu.org/software/guile/manual/html_node/Coding-W... Chicken Scheme: https://wiki.call-cc.org/man/4/Extensions%20to%20the%20standard#extended-dsssl-style-lambda-lists https://wiki.call-cc.org/man/4/Extensions%20to%20the%20stand...
- db48x 8y agoAnyone who has seriously proposed porting Emacs to any language will have made plans to support running the existing Elisp code without modification. You can easily write an Elisp compiler in Common Lisp. In fact, the original Lisp machine eventually supported Common Lisp as well as the original Lisp Machine Lisp. You could write any individual function in either language, and call from one to the other transparently.
- lispm 8y ago> You can easily write an Elisp compiler in Common Lisp I have no idea how easy it is and I have seen no attempt to do that (running the existing Elisp code without modification on top of a CL runtime). If it would be easy, I'd expect it to be done already. The https://www.cliki.net/CL-Emacs https://www.cliki.net/CL-Emacs page seems to of no help... Do you know of any attempt demonstrating how easy it actually is? > In fact, the original Lisp machine eventually supported Common Lisp as well as the original Lisp Machine Lisp. You could write any individual function in either language, and call from one to the other transparently. That was a major engineering effort - putting both languages side by side onto a single runtime.
- db48x 8y agoWell, I grant you that it won't be done in a day.