Emacs C has lots of sizeof(struct)*CHAR_BITS. Explicit is good, but I doubt many users have CHAR_BITS != 8.
miniblog.
Related Posts
I've realised that my favourite side projects all have fiddly bits.
It's really nice to have small features that you can add or debug in a few minutes.
Today I learnt that Cell<T> has the size of a pointer (i.e. probably 64 bits) in Rust, regardless of the size of T.
It's a common pattern for making struct fields mutable, but the T isn't actually stored inside the struct.
"What do you call a pointer we stole the high bits off? An ointer." https://docs.rs/ointers/latest/ointers/
Brilliant name for a pointer tagging library.