# 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:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dstarerstor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dstarerstor/32/8958_2.png) [@dstarerstor](https://discourse.julialang.org/u/dstarerstor)\
**Post date:** [December 4, 2019, 4:17pm UTC](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863/1 "2019-12-04T16:17:43Z")

</div>

I feel like I have seen this proposal before, but I can’t find it now and I don’t remember the resolution, so sorry if this is repetitive.

I think it would be very nice if single word arguments passed to a function after a semi-colon were interpreted as keyword arguments where the variable name is the keyword and the value is the value. For example:

```julia
f( ; kw) = kw

kw = 2
f(kw=kw) #returns 2
f(; kw) #throws a syntax error, but should it?

a = 2
f(a=a) #throws a MethodError
f(; a) #throws a syntax error, but maybe it should throw a MethodError?

```

Given that the current behavior is to throw an error, adding this would not break anything. It would be a big QOL improvement to avoid typing `x=x, y=y, z=z` over and over.

I’ve been using a macro get this syntax, but its not very elegant because only way I figured to make it work was to put all the arguments in a `Dict{Symbol, <:Any}` and then splat it after the semi-colon.

I’m curious to hear thoughts on whether or not this is a good idea

---

_[View the full topic](https://discourse.julialang.org/t/keyword-arguments-without-a-keyword/31863)._
