logoalt Hacker News

TazeTSchnitzelyesterday at 8:47 PM1 replyview on HN

I'm not sure if this quite answers your question, but the difference in philosophy here is that C++ objects with pointers always have identity, whereas a Rust object only has identity if it has a non-zero size. It's an application of the zero-overhead principle, "you only pay for what you use".


Replies

ketzuyesterday at 8:50 PM

"zero sized objects don't have identity" actually would answer my question and is a really interesting factoid, thanks!

show 2 replies