mirror of
https://github.com/Noratrieb/blog.git
synced 2026-01-14 12:35:00 +01:00
deploy: 89060da41b
This commit is contained in:
parent
f9229ee20a
commit
97626dbb67
5 changed files with 5 additions and 5 deletions
|
|
@ -146,7 +146,7 @@ and I prefer the mental model of “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
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ and I prefer the mental model of “reference that manages its own lifetime&
|
|||
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
|
||||
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><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<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>⌗</a></h1><p>There is one clear potential benefit from this box behaviour: ✨Optimizations✨. <code>noalias</code> doesn’t exist for fun, it’s something
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue