# Keyword arguments without a keyword?

**URL:** <https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863>\
**Category:** Internals & Design\
**Created:** [December 4, 2019, 4:17pm UTC](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863 "2019-12-04T16:17:43Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [December 11, 2019, 8:10pm UTC](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863/21 "2019-12-11T20:10:41Z")

</div>

That goes in the right direction. I think the body of the first `map` can be moved to a `resolve_kw` function and that function can be reused in the second `map`. This way fancy cases like `(;a=1, b, more...)` are handled better.

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [December 11, 2019, 11:22pm UTC](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863/22 "2019-12-11T23:22:01Z")

</div>

I just noticed that [AtBackslash.jl](https://github.com/tkf/AtBackslash.jl) (my unregistered package) already supports it:

```julia
julia> using AtBackslash

julia> f(; kwargs...) = (; kwargs...)
f (generic function with 1 method)

julia> let x = 1
           # input `()` is ignored
           () |> @\ f(; x)
       end
(x = 1,)

julia> (x = 1, y = 2) |> @\ f(; :x, a = :y) # more real-world usecase
(x = 1, a = 2)

```

(This is only relevant for anonymous functions, though.)

Julia’s AST is very well-designed so that you can accidentally implement features 🙂

---

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [December 13, 2019, 9:21pm UTC](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863/23 "2019-12-13T21:21:56Z")

</div>

[https://github.com/jw3126/EponymKeywordSyntax.jl](https://github.com/jw3126/EponymKeywordSyntax.jl)  
Registration is in progress.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [September 7, 2023, 5:50pm UTC](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863/24 "2023-09-07T17:50:59Z")

</div>

This is implemented in the language itself, since v1.5:

> <https://github.com/JuliaLang/julia/pull/34331>
>
> This implements #29333.
> 
> I went ahead and added dot syntax as well, i.e. \`a.b\`… implies \`b=a.b\`.

[Previous page](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863.md?page=1)
