# Named Tuples Verbosity

**URL:** <https://discourse.julialang.org/t/named-tuples-verbosity/22762>\
**Category:** General Usage\
**Created:** [April 4, 2019, 4:34pm UTC](https://discourse.julialang.org/t/named-tuples-verbosity/22762 "2019-04-04T16:34:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![srb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/srb/32/6812_2.png) [@srb](https://discourse.julialang.org/u/srb)\
**Post date:** [April 4, 2019, 4:34pm UTC](https://discourse.julialang.org/t/named-tuples-verbosity/22762/1 "2019-04-04T16:34:16Z")

</div>

Is there a more concise way to specify that the type of an argument is a named tuple? Right now I have a function that takes a named tuple of 2 structs and it makes the declaration very long. For example, if I have declared a struct `MyStruct` and I want to declare a function taking a named tuple of `MyStruct` it ends up like this:

```julia
function my_function(NamedTuple(:A, :B), Tuple{MyStruct, MyStruct}...)

```

Which seems quite verbose for something that could be just `NamedTuple(:A,:B, MyStruct)`.

Is there any way I could shorten it?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [April 4, 2019, 7:38pm UTC](https://discourse.julialang.org/t/named-tuples-verbosity/22762/3 "2019-04-04T19:38:30Z")

</div>

NamedTupleTools.jl will help you I think.
