# \`foo = () -\> 3\` vs. \`foo() = 3\`

**URL:** <https://discourse.julialang.org/t/foo-3-vs-foo-3/59710>\
**Category:** New to Julia\
**Tags:** functions\
**Created:** [April 21, 2021, 4:34am UTC](https://discourse.julialang.org/t/foo-3-vs-foo-3/59710 "2021-04-21T04:34:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [April 21, 2021, 7:20am UTC](https://discourse.julialang.org/t/foo-3-vs-foo-3/59710/5 "2021-04-21T07:20:43Z")

</div>

Well, it turns out that this is more of a bug than feature.

Discourse discussion: [Confused by behaviour of nested functions](https://discourse.julialang.org/t/confused-by-behaviour-of-nested-functions/20576)

And related github issue: [disallow methods of local functions in different blocks · Issue #15602 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/15602)

I think in an issue it is explained better than I can do.

---

_[View the full topic](https://discourse.julialang.org/t/foo-3-vs-foo-3/59710)._
