emacs-internals

1 article
sort: new top best
clear filter
0 2/10

This article explores how GNU Emacs uses tagged pointers (leveraging alignment bits in heap object pointers) to represent polymorphic Lisp values in a single 64-bit word, contrasting this approach with C++17's std::variant (tagged unions) and modern fat pointers used in Go and Rust. The piece explains the memory and performance tradeoffs between these type representation strategies and how Emacs achieves polymorphism through a poor man's inheritance scheme limited to 8 fundamental types.

GNU Emacs Lisp_Object C++ std::variant std::visit LLVM Go Rust Haskell OCaml GHC McCarthy's Lisp
thecloudlet.github.io · thecloudlet · 4 days ago · details · hn