Hacker News new | ask | show | jobs
by OskarS 5 days ago
> But for what it's worth, Emacs lisp might be the best way to learn lisp because Emacs is more or less a virtual lisp machine if you squint hard enough.

This is really true. Emacs Lisp is a much worse Lisp than Scheme (dynamic binding instead of lexical binding by default is the most obvious thing, though of course you can opt in to it), but the thing Emacs Lisp does is that it really nails the "interactive coding" experience. Like, you just edit and run code from inside the thing that is running the code, it's really cool. It makes the "Lisp machine" thing click better than anything else I've used.

I used gone from vim -> emacs -> neovim (sometimes embedded in vscode) as my editor of choice, and the interactive environment thing is one of the things I miss most from emacs.

2 comments

To be clear, I am not arguing for or against Emacs as an editor. Just in favor using Emacs Lisp as a way of learning Lisp.

the thing Emacs Lisp does is that it really nails the "interactive coding" experience. Like, you just edit and run code from inside the thing that is running the code, it's really cool. It makes the "Lisp machine" thing click better than anything else I've used.

Basically, that's a traditional difference between a Lisp and Scheme (but if you call both "lisps" I know what you mean).

And you can do this: https://www.youtube.com/watch?v=dljNabciEGg

> dynamic binding instead of lexical binding

cloja pleeease... we stopped using dynamic binding in Elisp like ten years ago. Lexical binding arrived in Emacs 24, released in June 2012.

Isn’t it opt-in on a file basis still? Fair enough, I haven’t ised Emacs in a while :)
Well, it's in the same way "opt-in" as the .el extension. One can literally name a file some-crap.bla, put some elisp in it and Emacs would happily load and execute it. Nobody does that. eval commands been on lexical binding by default since Emacs 27 (we're currently on 32). Like I said, "dynamic binding" not a problem, or at least not something that even warrants a discussion, and that's how it's been for a decade or so.
For whatever it’s worth, eMacs 27 came out in 2020. So not a long time ago (on the scale of eMacs but not recently either on the scale of software.
The release cadence has changed, the pace has increased. Like I said: "we're on Emacs 32 now", so 27 can be considered "long ago". The times when one had to wait for a decade to see a fix for a bug in Emacs core are long gone.