# (on hold): If you have a function called \`main\`, you may need to tweak it

**URL:** <https://discourse.julialang.org/t/on-hold-if-you-have-a-function-called-main-you-may-need-to-tweak-it/103519>\
**Category:** General Usage\
**Created:** [September 4, 2023, 9:27pm UTC](https://discourse.julialang.org/t/on-hold-if-you-have-a-function-called-main-you-may-need-to-tweak-it/103519 "2023-09-04T21:27:52Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [September 6, 2023, 2:54am UTC](https://discourse.julialang.org/t/on-hold-if-you-have-a-function-called-main-you-may-need-to-tweak-it/103519/41 "2023-09-06T02:54:23Z")

</div>

Here is my attempt to document the reservation of double underscore, or dunder, names:

> <https://github.com/JuliaLang/julia/pull/51215>
>
> In the recent discussion about \`main\`, \`\_\_main\_\_\` was proposed. One reason in fa…vor of this is that double underscore, or dunder, names are reserved names in Julia. This however is not documented.
> 
> This pull request adds a paragraph reserving double underscore names for Julia.
> 
> cc: @StefanKarpinski

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [September 6, 2023, 9:12am UTC](https://discourse.julialang.org/t/on-hold-if-you-have-a-function-called-main-you-may-need-to-tweak-it/103519/42 "2023-09-06T09:12:42Z")

</div>

Just realized that [GitHub - comonicon/Comonicon.jl: Your best CLI generator in JuliaLang](https://github.com/comonicon/Comonicon.jl) would probably break with this proposal, wouldn’t it?

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [September 7, 2023, 3:41pm UTC](https://discourse.julialang.org/t/on-hold-if-you-have-a-function-called-main-you-may-need-to-tweak-it/103519/43 "2023-09-07T15:41:07Z")

</div>

@Roger-luo responded to a similar concern on slack that it probably wouldn’t, since Comonicon uses macros to expand it different function names.

> [@Aaron\_Denney](#):
>
> Being able to specify entrypoints in `Project.toml`, which gets us multiple for free, and lets us change exactly how that cashes out in terms of executables, etc.

I like this too, and I’m surprised no one has yet brought up [Applications: what are they? · Issue #1962 · JuliaLang/Pkg.jl · GitHub](https://github.com/JuliaLang/Pkg.jl/issues/1962), which discussed this idea and a lot of others, none of which seem satisfied by this particular proposal.

[Previous page](https://discourse.julialang.org/t/on-hold-if-you-have-a-function-called-main-you-may-need-to-tweak-it/103519.md?page=2)
