Sure, I can see how the code doesn't immediately tell you the difference but after you understood it, isn't it completely logical?
The title seems clickbaity and not accurate when you dig into the article.
Sure, I can see how the code doesn't immediately tell you the difference but after you understood it, isn't it completely logical?
The title seems clickbaity and not accurate when you dig into the article.
Do you think the title is still inaccurate even from that point of view?
And IMO the title is still inaccurate because it attacks a general promised/desired property of Rust (and other languages) and I honestly don't see the connection. Looks like the observed behaviour is an unfortunate side effect of the `newtype` thing and is very prone to fixing and optimization in future versions. It's not a failure of the "zero-cost abstraction" ideal which is being chased after every day and is still in flux.
The second example doesn't seem compelling to me either...is a newtype of a reference type a common application?