News for hackers. Stuff that matters.
Re:My Emacs Lisp book is finished by deworms on Tuesday November 09, 2021 @03:56AM (#29159258)
Elisp is a really poor language compared to almost anything else, more work should be done to allow Emacs to be configured in other languages.
Re:My Emacs Lisp book is finished by klibertp on Tuesday November 09, 2021 @07:55AM (#29161096)
> Elisp is a really poor language compared to almost anything else

What makes Elisp a "poor language" in your opinion?

Elisp is actually a really good language. Especially compared to other languages used for scripting, like Lua or JS. In some areas Elisp is significantly more advanced than either: pattern matching (pcase, dash), object orientation (multimethods, multiple inheritance), iteration (loop), data types (Lua has 3, JS a bit more, while Elisp gives you lists (pairs, proplists, assoc lists, trees), vectors, maps, unicode strings with optional metadata, queues, rings, and more. While the lack of reader macros is unfortunate, the macro system along with hooks and advice allow for writing libraries that integrate seamlessly into the environment, and ones that cleanly hide a lot of complexity (ie. use-package). Additionally, Elisp performance is not very bad (though of course worse than JITed languages) and it got AOT native compiler recently, which should help improve upon it.

Namespaces are the only lacking feature at this point. I mean, there are lots of places where Elisp could and should be improved, but it's in quite good shape already. Definitely not "really poor", especially compared to the other scripting languages.

Re:My Emacs Lisp book is finished by NeutralForest on Tuesday November 09, 2021 @06:16AM (#29160190)
Emacs and Elisp are too intertwined at this point. This interview https://www.youtube.com/watch?v=LKegZI9vWUU of the creator of Doom Emacs talks about this exact problem.
Re:My Emacs Lisp book is finished by shidima on Tuesday November 09, 2021 @05:20AM (#29159808)
Maybe if you would elaborate on why you think that, you would not be down voted so much. Having said that, if you don't like it maybe you should find an editor that suits you more?
Re:My Emacs Lisp book is finished by Koshkin on Tuesday November 09, 2021 @07:06AM (#29160550)
To be fair, the parent is not talking about the editor but rather its configuration language. Indeed, there have been attempts to replace elisp with other languages, such as Scheme (guile) and Common Lisp.
Re:My Emacs Lisp book is finished by mindcrime on Tuesday November 09, 2021 @11:25AM (#29163784)
There is apparently a Guile enabled version of Emacs available.

https://www.emacswiki.org/emacs/GuileEmacs

https://www.emacswiki.org/emacs/GuileEmacsBuild

Re:My Emacs Lisp book is finished by bloopernova on Tuesday November 09, 2021 @08:28AM (#29161421)
Can you give some reasons why you dislike Elisp?

What language would you re-write Emacs configurations in?

Re:My Emacs Lisp book is finished by mcguire on Tuesday November 09, 2021 @04:04PM (#29167455)
I believe your second question needs to be rephrased as "What language would you re-write Emacs in?"

I don't remember what the core to elisp fraction is, but it's not that big.

Re:My Emacs Lisp book is finished by Jtsummers on Tuesday November 09, 2021 @05:53PM (#29168649)
Emacs is written in C and Emacs Lisp. I’m not able to download the source right now, but from some googling the C portion is around 20-25%. So 75-80% lisp. That’s a rather substantial amount of code that would need to be rewritten, not to mention that probably does not include all the lisp code that’s not included in the core distribution. Tons of packages out there that would need to be rewritten.

  -----ADDED-----
Downloaded 27.2:

  Emacs Lisp: 1,171,507
  C         :   318,611
  C Headers :    43,738
(that's without comments)

That's a lot of code to replace, and again, just what's in the core distribution.

Re:My Emacs Lisp book is finished by nonameisfinetoo on Tuesday November 09, 2021 @05:03AM (#29159685)
Dude, I think you might have a problem