This commit is contained in:
Nilstrieb 2022-07-24 19:46:06 +00:00
parent f9229ee20a
commit 97626dbb67
5 changed files with 5 additions and 5 deletions

View file

@ -146,7 +146,7 @@ and I prefer the mental model of “reference that manages its own lifet
provide an aliasable version of <code>Box<T></code>, which is used by the self-referential type helper crate <a href="https://crates.io/crates/ouroboros">ouroboros</a>. provide an aliasable version of <code>Box<T></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 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<T></code>, even though <code>Vec<T></code> can currently be aliased in practice and having to write their own. Interestingly, this crate also provides a <code>Vec<T></code>, even though <code>Vec<T></code> 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.</p> don’t think this can reasonable be changed.</p>
<blockquote> <blockquote>
<p>One thing was just pointed out to me after releasing the post: Mutation usually goes through <code>&mut T</code> anyways, even when the value <p>One thing was just pointed out to me after releasing the post: Mutation usually goes through <code>&mut T</code> anyways, even when the value

View file

@ -113,7 +113,7 @@ and I prefer the mental model of “reference that manages its own lifetime&
provide an aliasable version of <code>Box&lt;T></code>, which is used by the self-referential type helper crate <a href=https://crates.io/crates/ouroboros>ouroboros</a>. provide an aliasable version of <code>Box&lt;T></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 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></code>, even though <code>Vec&lt;T></code> can currently be aliased in practice and having to write their own. Interestingly, this crate also provides a <code>Vec&lt;T></code>, even though <code>Vec&lt;T></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>&mut T</code> anyways, even when the value 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>&mut T</code> anyways, even when the value
is stored as a <code>Box&lt;T></code>. Therefore, all the guarantees of uniqueness are already present when mutating boxes, making the uniqueness is stored as a <code>Box&lt;T></code>. Therefore, all the guarantees of uniqueness are already present when mutating boxes, making the uniqueness
of box even less important.</p></blockquote><h1 id=noalias-noslow>noalias, noslow<a href=#noalias-noslow class=hanchor arialabel=Anchor>&#8983;</a></h1><p>There is one clear potential benefit from this box behaviour: ✨Optimizations✨. <code>noalias</code> doesn&rsquo;t exist for fun, it&rsquo;s something of box even less important.</p></blockquote><h1 id=noalias-noslow>noalias, noslow<a href=#noalias-noslow class=hanchor arialabel=Anchor>&#8983;</a></h1><p>There is one clear potential benefit from this box behaviour: ✨Optimizations✨. <code>noalias</code> doesn&rsquo;t exist for fun, it&rsquo;s something

View file

@ -146,7 +146,7 @@ and I prefer the mental model of &amp;ldquo;reference that manages its own lifet
provide an aliasable version of &lt;code>Box&amp;lt;T&amp;gt;&lt;/code>, which is used by the self-referential type helper crate &lt;a href="https://crates.io/crates/ouroboros">ouroboros&lt;/a>. provide an aliasable version of &lt;code>Box&amp;lt;T&amp;gt;&lt;/code>, which is used by the self-referential type helper crate &lt;a href="https://crates.io/crates/ouroboros">ouroboros&lt;/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 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 &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code>, even though &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code> can currently be aliased in practice and having to write their own. Interestingly, this crate also provides a &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code>, even though &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code> can currently be aliased in practice and
in the current version of stacked borrows. just fine, although it&amp;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&amp;rsquo;s also not clear whether we want to keep it like this, but I
don&amp;rsquo;t think this can reasonable be changed.&lt;/p> don&amp;rsquo;t think this can reasonable be changed.&lt;/p>
&lt;blockquote> &lt;blockquote>
&lt;p>One thing was just pointed out to me after releasing the post: Mutation usually goes through &lt;code>&amp;amp;mut T&lt;/code> anyways, even when the value &lt;p>One thing was just pointed out to me after releasing the post: Mutation usually goes through &lt;code>&amp;amp;mut T&lt;/code> anyways, even when the value

View file

@ -146,7 +146,7 @@ and I prefer the mental model of &amp;ldquo;reference that manages its own lifet
provide an aliasable version of &lt;code>Box&amp;lt;T&amp;gt;&lt;/code>, which is used by the self-referential type helper crate &lt;a href="https://crates.io/crates/ouroboros">ouroboros&lt;/a>. provide an aliasable version of &lt;code>Box&amp;lt;T&amp;gt;&lt;/code>, which is used by the self-referential type helper crate &lt;a href="https://crates.io/crates/ouroboros">ouroboros&lt;/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 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 &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code>, even though &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code> can currently be aliased in practice and having to write their own. Interestingly, this crate also provides a &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code>, even though &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code> can currently be aliased in practice and
in the current version of stacked borrows. just fine, although it&amp;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&amp;rsquo;s also not clear whether we want to keep it like this, but I
don&amp;rsquo;t think this can reasonable be changed.&lt;/p> don&amp;rsquo;t think this can reasonable be changed.&lt;/p>
&lt;blockquote> &lt;blockquote>
&lt;p>One thing was just pointed out to me after releasing the post: Mutation usually goes through &lt;code>&amp;amp;mut T&lt;/code> anyways, even when the value &lt;p>One thing was just pointed out to me after releasing the post: Mutation usually goes through &lt;code>&amp;amp;mut T&lt;/code> anyways, even when the value

View file

@ -146,7 +146,7 @@ and I prefer the mental model of &amp;ldquo;reference that manages its own lifet
provide an aliasable version of &lt;code>Box&amp;lt;T&amp;gt;&lt;/code>, which is used by the self-referential type helper crate &lt;a href="https://crates.io/crates/ouroboros">ouroboros&lt;/a>. provide an aliasable version of &lt;code>Box&amp;lt;T&amp;gt;&lt;/code>, which is used by the self-referential type helper crate &lt;a href="https://crates.io/crates/ouroboros">ouroboros&lt;/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 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 &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code>, even though &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code> can currently be aliased in practice and having to write their own. Interestingly, this crate also provides a &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code>, even though &lt;code>Vec&amp;lt;T&amp;gt;&lt;/code> can currently be aliased in practice and
in the current version of stacked borrows. just fine, although it&amp;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&amp;rsquo;s also not clear whether we want to keep it like this, but I
don&amp;rsquo;t think this can reasonable be changed.&lt;/p> don&amp;rsquo;t think this can reasonable be changed.&lt;/p>
&lt;blockquote> &lt;blockquote>
&lt;p>One thing was just pointed out to me after releasing the post: Mutation usually goes through &lt;code>&amp;amp;mut T&lt;/code> anyways, even when the value &lt;p>One thing was just pointed out to me after releasing the post: Mutation usually goes through &lt;code>&amp;amp;mut T&lt;/code> anyways, even when the value