# A Question of Style: Should inner constructor completion functions end with ! 

**URL:** <https://discourse.julialang.org/t/a-question-of-style-should-inner-constructor-completion-functions-end-with/8948>\
**Category:** General Usage\
**Tags:** question, design\
**Created:** [February 9, 2018, 12:52pm UTC](https://discourse.julialang.org/t/a-question-of-style-should-inner-constructor-completion-functions-end-with/8948 "2018-02-09T12:52:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon32405968](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@anon32405968](https://discourse.julialang.org/u/anon32405968)\
**Post date:** [February 9, 2018, 12:52pm UTC](https://discourse.julialang.org/t/a-question-of-style-should-inner-constructor-completion-functions-end-with/8948/1 "2018-02-09T12:52:36Z")

</div>

In the **Julia style guide** , direct link below, it recommends **appending an exclamation mark** to the end function names which **modify their arguments** :

[https://docs.julialang.org/en/stable/manual/style-guide/#Append-!-to-names-of-functions-that-modify-their-arguments-1](https://docs.julialang.org/en/stable/manual/style-guide/#Append-!-to-names-of-functions-that-modify-their-arguments-1)

**However** , at the end of the section on inner constructors with incomplete arguments where a completion function is used, direct link below, the function _complete\_me_ does not have an exclamation mark at the end even though it modifies its argument.

[https://docs.julialang.org/en/stable/manual/constructors/#Incomplete-Initialization-1](https://docs.julialang.org/en/stable/manual/constructors/#Incomplete-Initialization-1)

My opinion is that although the “!” requirement is less stringent on inner constructor completion functions, as they will never be called directly and only indirectly upon creation of a struct instance, the “!” should still be appended to the function name for code reading clarity.

However, I’m fairly new to Julia (recent migrant from Python). If any more experienced Julia devs have an opinion I’d be very curious to know.

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [February 9, 2018, 12:55pm UTC](https://discourse.julialang.org/t/a-question-of-style-should-inner-constructor-completion-functions-end-with/8948/2 "2018-02-09T12:55:13Z")

</div>

_No_ – a bit of apples and oranges here. Inner constructors with or without a “completion function” construct, the functionwithbang!() signifies the overwriting of an extant value.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 9, 2018, 1:50pm UTC](https://discourse.julialang.org/t/a-question-of-style-should-inner-constructor-completion-functions-end-with/8948/3 "2018-02-09T13:50:52Z")

</div>

> [@anon32405968](#):
>
> “!” should still be appended to the function name for code reading clarity.

I agree, perhaps submit a PR for the documentation (you can do this easily on Github).

---

<div class="post-metadata">

**Author:** ![anon32405968](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@anon32405968](https://discourse.julialang.org/u/anon32405968)\
**Post date:** [February 15, 2018, 1:15pm UTC](https://discourse.julialang.org/t/a-question-of-style-should-inner-constructor-completion-functions-end-with/8948/4 "2018-02-15T13:15:54Z")

</div>

Submitted PR here:

[https://github.com/JuliaLang/julia/pull/25982](https://github.com/JuliaLang/julia/pull/25982)
