Live data from Hacker News

Gödel, Escher, Elisp: The Beauty of Macros

chiply.dev

1–10 of 44 posts

Re: Gödel, Escher, Elisp: The Beauty of Macros

#4
> To anticipate a common question: why couldn't my-unless be a function? Function arguments are evaluated eagerly, before the function ever sees them.

Interesting, so if you’re using a lazy language then you don’t need a macro here and could write my-unless as a function.

Re: Gödel, Escher, Elisp: The Beauty of Macros

#5
post #4

> To anticipate a common question: why couldn't my-unless be a function? Function arguments are evaluated eagerly, before the function ever sees them. Interesting, so if you’re using a lazy language then you don’t need a macro here and could write my-unless as a function.

Indeed:

https://hackage-content.haskell.org/package/base-4.22.0.0/do...

Re: Gödel, Escher, Elisp: The Beauty of Macros

#8
post #7

If macros can implement arbitrary language features then how come elisp has never built a type system?

Well, not elisp, but https://coalton-lang.github.io or maybe https://shen-language.github.io

Typed racket too, might I add. I just imagine static typing around stable core APIs would help users understand how eglot and vertico compare to prior art. The way I learned how the completion stack works was to ask claude to show me what the elisp entrypoints would look like if implemented in typescript. It's not because I'm unfamiliar with lisp, I'm not, it's just easier to reason with the world in terms of data structures and their contracts.
Post reply on HN