diff --git a/index.xml b/index.xml index 3637b9c..ee81ea0 100644 --- a/index.xml +++ b/index.xml @@ -146,7 +146,7 @@ and I prefer the mental model of &ldquo;reference that manages its own lifet provide an aliasable version of <code>Box&lt;T&gt;</code>, which is used by the self-referential type helper crate <a href="https://crates.io/crates/ouroboros">ouroboros</a>. So if box stayed unique, people could also just pick up that crate as a dependency and use the aliasable box from there instead of having to write their own. Interestingly, this crate also provides a <code>Vec&lt;T&gt;</code>, even though <code>Vec&lt;T&gt;</code> can currently be aliased in practice and -in the current version of stacked borrows. just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I +in the current version of stacked borrows just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I don&rsquo;t think this can reasonable be changed.</p> <blockquote> <p>One thing was just pointed out to me after releasing the post: Mutation usually goes through <code>&amp;mut T</code> anyways, even when the value diff --git a/posts/box-is-a-unique-type/index.html b/posts/box-is-a-unique-type/index.html index 7e94ebf..6472154 100644 --- a/posts/box-is-a-unique-type/index.html +++ b/posts/box-is-a-unique-type/index.html @@ -113,7 +113,7 @@ and I prefer the mental model of “reference that manages its own lifetime& provide an aliasable version of Box<T>, which is used by the self-referential type helper crate ouroboros. So if box stayed unique, people could also just pick up that crate as a dependency and use the aliasable box from there instead of having to write their own. Interestingly, this crate also provides a Vec<T>, even though Vec<T> can currently be aliased in practice and -in the current version of stacked borrows. just fine, although it’s also not clear whether we want to keep it like this, but I +in the current version of stacked borrows just fine, although it’s also not clear whether we want to keep it like this, but I don’t think this can reasonable be changed.

One thing was just pointed out to me after releasing the post: Mutation usually goes through &mut T anyways, even when the value is stored as a Box<T>. Therefore, all the guarantees of uniqueness are already present when mutating boxes, making the uniqueness of box even less important.

noalias, noslow

There is one clear potential benefit from this box behaviour: ✨Optimizations✨. noalias doesn’t exist for fun, it’s something diff --git a/posts/index.xml b/posts/index.xml index 8f42c2d..b82e62d 100644 --- a/posts/index.xml +++ b/posts/index.xml @@ -146,7 +146,7 @@ and I prefer the mental model of &ldquo;reference that manages its own lifet provide an aliasable version of <code>Box&lt;T&gt;</code>, which is used by the self-referential type helper crate <a href="https://crates.io/crates/ouroboros">ouroboros</a>. So if box stayed unique, people could also just pick up that crate as a dependency and use the aliasable box from there instead of having to write their own. Interestingly, this crate also provides a <code>Vec&lt;T&gt;</code>, even though <code>Vec&lt;T&gt;</code> can currently be aliased in practice and -in the current version of stacked borrows. just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I +in the current version of stacked borrows just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I don&rsquo;t think this can reasonable be changed.</p> <blockquote> <p>One thing was just pointed out to me after releasing the post: Mutation usually goes through <code>&amp;mut T</code> anyways, even when the value diff --git a/tags/rust/index.xml b/tags/rust/index.xml index fc7bde5..c440894 100644 --- a/tags/rust/index.xml +++ b/tags/rust/index.xml @@ -146,7 +146,7 @@ and I prefer the mental model of &ldquo;reference that manages its own lifet provide an aliasable version of <code>Box&lt;T&gt;</code>, which is used by the self-referential type helper crate <a href="https://crates.io/crates/ouroboros">ouroboros</a>. So if box stayed unique, people could also just pick up that crate as a dependency and use the aliasable box from there instead of having to write their own. Interestingly, this crate also provides a <code>Vec&lt;T&gt;</code>, even though <code>Vec&lt;T&gt;</code> can currently be aliased in practice and -in the current version of stacked borrows. just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I +in the current version of stacked borrows just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I don&rsquo;t think this can reasonable be changed.</p> <blockquote> <p>One thing was just pointed out to me after releasing the post: Mutation usually goes through <code>&amp;mut T</code> anyways, even when the value diff --git a/tags/unsafe-code/index.xml b/tags/unsafe-code/index.xml index 3ba9d86..0142334 100644 --- a/tags/unsafe-code/index.xml +++ b/tags/unsafe-code/index.xml @@ -146,7 +146,7 @@ and I prefer the mental model of &ldquo;reference that manages its own lifet provide an aliasable version of <code>Box&lt;T&gt;</code>, which is used by the self-referential type helper crate <a href="https://crates.io/crates/ouroboros">ouroboros</a>. So if box stayed unique, people could also just pick up that crate as a dependency and use the aliasable box from there instead of having to write their own. Interestingly, this crate also provides a <code>Vec&lt;T&gt;</code>, even though <code>Vec&lt;T&gt;</code> can currently be aliased in practice and -in the current version of stacked borrows. just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I +in the current version of stacked borrows just fine, although it&rsquo;s also not clear whether we want to keep it like this, but I don&rsquo;t think this can reasonable be changed.</p> <blockquote> <p>One thing was just pointed out to me after releasing the post: Mutation usually goes through <code>&amp;mut T</code> anyways, even when the value