# Conventional name for an optional workspace keyword argument

**URL:** <https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172>\
**Category:** General Usage\
**Created:** [May 16, 2022, 10:12pm UTC](https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172 "2022-05-16T22:12:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lilith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lilith/32/27492_2.png) [@Lilith](https://discourse.julialang.org/u/Lilith)\
**Post date:** [May 16, 2022, 10:12pm UTC](https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172/1 "2022-05-16T22:12:06Z")

</div>

I have a function `sort!` that operates out of place and accepts an optional workspace vector as a keyword argument for performance reasons. Is there a conventional name for this argument?

```julia
y = similar(first(x))
for xi in x
    sort!(xi; name=y)
end

```

What should `name` be?

(cross-posted: [Add workspace/buffer support to sorting by LilithHafner · Pull Request #45330 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/45330))

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [May 16, 2022, 10:30pm UTC](https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172/2 "2022-05-16T22:30:26Z")

</div>

I usually think of a “cache” as being a cache of _values_, rather than a location with empty available memory.

Perhaps “workspace” or “buffer” works better.

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [May 17, 2022, 6:04am UTC](https://discourse.julialang.org/t/conventional-name-for-an-optional-workspace-keyword-argument/81172/3 "2022-05-17T06:04:06Z")

</div>

LAPACK, for example, uses “WORK”, so I think something similar to “workspace” may be a good idea
