Comment

Comment by mmusson

> Huh? How do you think `const char s = "Hello"; const char t = &s[1];` works?

I think you and the parent are using different definitions of granularity. The parent meant that sizeof(t) could be 32 or 64 bits. I think you just meant that the smallest thing the pointer references is the address of a single byte.

Rust already has fat pointers though. A reference to a smaller byte value could be a pointer plus a bit-mask.

parent mmusson 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton