# Function type signature

**URL:** <https://discourse.julialang.org/t/function-type-signature/43101>\
**Category:** General Usage\
**Created:** [July 15, 2020, 3:41am UTC](https://discourse.julialang.org/t/function-type-signature/43101 "2020-07-15T03:41:32Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)\
**Post date:** [July 15, 2020, 7:10am UTC](https://discourse.julialang.org/t/function-type-signature/43101/21 "2020-07-15T07:10:02Z")

</div>

If you know how to read lisp / scheme, the code is approximatively there

[https://github.com/JuliaLang/julia/blob/master/src/julia-syntax.scm#L1061-L1070](https://github.com/JuliaLang/julia/blob/master/src/julia-syntax.scm#L1061-L1070)

and there [https://github.com/JuliaLang/julia/blob/master/src/julia-syntax.scm#L1413-L1473](https://github.com/JuliaLang/julia/blob/master/src/julia-syntax.scm#L1413-L1473)

As stated, it seems it will push `local` one by one in func and unwrap / unpack to them from a unique arg kept in sig (need to be reviewed) _If my lisp is not too much rusted in the parenthesis call stack ocean_

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [July 15, 2020, 8:09am UTC](https://discourse.julialang.org/t/function-type-signature/43101/22 "2020-07-15T08:09:52Z")

</div>

> [@pauljurczak](#):
>
> Perhaps it would make some sense to have `Julia for dummies` REPL setting, which would minimize implicit rules and irregularities at the cost of more verbose output.

In my opinion, implicit rules and irregularities should be avoided in principle, not only “for dummies” or beginners. (Actually, I’d say that your suggestion is uncommon; beginners often ask for more verbose help pages and hand-holding error messages, but prefer less verbose output about aspects that are difficult for them to understand and find just distracting or screen-cluttering, including type signatures.)

I think that a conflict in this particular case is that the definition of function methods is not really a subject for beginners. If I had to recommend some reading to someone who is starting to use Julia, I would definitely tell that person to read [the section of the manual about functions](https://docs.julialang.org/en/v1/manual/functions/), but leave [the section about methods](https://docs.julialang.org/en/v1/manual/methods/) for later on. In the first steps of learning Julia, while struggling with more basic concepts, users can live without knowing methods and all their complications, defining different functions like `foo_singleargument`, `foo_tuple` for different inputs.

By the way, I think that this sentence in the section about methods also answers your original question:

> [@](#):
>
> In the absence of a type declaration with `::` , the type of a method parameter is `Any` by default, meaning that it is unconstrained since all values in Julia are instances of the abstract type `Any` .

There is nothing about the different output of `methods` that you found confusing, which I don’t actually know if it is an intended feature. But with that information, it should be sufficient to understand what was happening in the first place.

---

<div class="post-metadata">

**Author:** ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)\
**Post date:** [July 15, 2020, 8:50am UTC](https://discourse.julialang.org/t/function-type-signature/43101/23 "2020-07-15T08:50:54Z")

</div>

I think we could improve the printing for the implicit unnamed argument. I’m not sure I have a concrete suggestion, but it does seem like it might cause some confusion.

---

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [July 15, 2020, 8:52am UTC](https://discourse.julialang.org/t/function-type-signature/43101/24 "2020-07-15T08:52:40Z")

</div>

> [@heliosdrm](#):
>
> your suggestion is uncommon

It most likely is. I’m an old timer. I’ve seen dozens of languages and programming paradigms. This means that I have multiple plausible explanations when I see something behaving unexpectedly. Verbosity allows to reduce the number of hypothesis. Sometimes, I don’t believe what I see, at least at the first glance. 🙂

I really appreciate all the help I’m getting. I’ve been asking a lot of questions recently. Due to time constraints and my learning style, I have to keep writing my Julia code while I learn the language.

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [July 15, 2020, 9:17am UTC](https://discourse.julialang.org/t/function-type-signature/43101/25 "2020-07-15T09:17:31Z")

</div>

If no improvement is easily found, explaining this in the docs my be a solution  
[https://github.com/JuliaLang/julia/pull/36673](https://github.com/JuliaLang/julia/pull/36673)

[Previous page](https://discourse.julialang.org/t/function-type-signature/43101.md?page=1)
