3 ms·
Apparently a "tootsie pop" is an American sweet (candy) which has a hard centre and a soft middle. The allegory is that having a hard fixed API with a dangerous
by alblue 10y ago
Apparently a "tootsie pop" is an American sweet (candy) which has a hard centre and a soft middle. The allegory is that having a hard fixed API with a dangerous/unsafe centre is the way to wrap unsafe code. Though why the article wasn't just titled "how to wrap unsafe code in Rust" is unclear to me.
- tatterdemalion 10y agoThis post is not about 'wrapping unsafe code' - in fact, its not even about writing Rust at all. Its about trying to delimit the scopes in which the compiler will perform optimizations based on invariants that are guaranteed in safe Rust but can be violated in unsafe Rust. This is a post about the design of the language, not of code in the language. The name was chosen because it was the metaphor the author thought of; as a bonus, you've learned something about another culture. Tootsie pops (the most common lollipop in the United States) have a privileged place in American pop culture because of this commercial: https://www.youtube.com/watch?v=O6rHeD5x2tI https://www.youtube.com/watch?v=O6rHeD5x2tI