For those unfamiliar with out parameters in other languages like C#, this is an unclear name.
What an Out<T> is, at its core, is a write-only reference to T that can be constructed from &mut T or &mut MaybeUninit<T> (or [MaybeUninit<T>]).
I have a few proposed renaming options for us:
Don't rename it, Out is fine. Brevity is important!
WriteOnly - it's important to note that this is write only since "writeable" often implies "readable". The fact that it has a lifetime implies it's a ref already.
WriteRef - it's important to note that this is a ref.
WriteOnlyRef - all of the advantages of 2️⃣ and 4️⃣ , though long to spell
WRef - short, the W is short for "write", and it's a ref.
WoRef - Write-only ref. Wo is not a well-known acronym I find, but we can start the trend 😄
Wo - Write-only. Extreme brevity 💥
I'm also proposing these options to my team at work to see what they think. So far, Out and WriteOnly + a Wo type alias for brevity are the most popular. Let me know if you have other name proposals as well.
For those unfamiliar with
out
parameters in other languages like C#, this is an unclear name.What an
Out<T>
is, at its core, is a write-only reference toT
that can be constructed from&mut T
or&mut MaybeUninit<T>
(or[MaybeUninit<T>]
).I have a few proposed renaming options for us:
Out
is fine. Brevity is important!WriteOnly
- it's important to note that this is write only since "writeable" often implies "readable". The fact that it has a lifetime implies it's a ref already.WriteRef
- it's important to note that this is a ref.WriteOnlyRef
- all of the advantages of 2️⃣ and 4️⃣ , though long to spellWRef
- short, theW
is short for "write", and it's a ref.WoRef
- Write-only ref.Wo
is not a well-known acronym I find, but we can start the trend 😄Wo
- Write-only. Extreme brevity 💥I'm also proposing these options to my team at work to see what they think. So far,
Out
andWriteOnly
+ aWo
type alias for brevity are the most popular. Let me know if you have other name proposals as well.