# Keyword argument types - what's going on?

**URL:** <https://discourse.julialang.org/t/keyword-argument-types-whats-going-on/75778>\
**Category:** New to Julia\
**Created:** [February 4, 2022, 8:40am UTC](https://discourse.julialang.org/t/keyword-argument-types-whats-going-on/75778 "2022-02-04T08:40:49Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [February 4, 2022, 9:14am UTC](https://discourse.julialang.org/t/keyword-argument-types-whats-going-on/75778/11 "2022-02-04T09:14:12Z")

</div>

> [@FedeClaudi](#):
>
> The only other solution I can think of is having both `n, p` as keyword arguments to a single methods that then behaves differently based on which one is used, but I felt that it wouldn’t be the most Julian way to do this, any suggestion on how do it better?

Yes I think t it’s better to have one method defined as e.g. `f(x; n=nothing, p=nothing)` and in the body of `f` check which argument is given by the user. In this body you can then dispatch the implementation to two different helper functions.

---

_[View the full topic](https://discourse.julialang.org/t/keyword-argument-types-whats-going-on/75778)._
