One interesting property of emacs lisp is that a macro can't do an early return from a function. You either need a wrapper (like cl-block or cl-defun) or you have to signal.
C macros (including those in Emacs itself) don't have this property, making it harder to reason about.
miniblog.
Related Posts
Is there any way of doing tagged references in safe Rust?
I've been looking at tagged pointers (the crate https://docs.rs/tagged-pointer/latest/tagged_pointer/ looks excellent) but it gives you back a raw pointer.
I'm not sure if you can create a safe wrapper for references using tagged pointers.
Opaque types in JavaScript: https://codemix.com/opaque-types-in-javascript/
Shows a nice compromise between wrapper types (stronger type guarantees) and primitive types (lots of functions already defined on the type).
In principle you can create wrapper types in any PL, eg Path(Str) for filesystem functions. I only see it used w/ static types in practice.