# Is there a Julia Style Guide?

**URL:** <https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195>\
**Category:** New to Julia\
**Tags:** question, formatting, best-practices\
**Created:** [April 28, 2022, 9:32am UTC](https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195 "2022-04-28T09:32:04Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [April 29, 2022, 12:20am UTC](https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195/21 "2022-04-29T00:20:01Z")

</div>

I believe the case suggested for type name is actually PascalCase (as opposed to camelCase, where the first letter is lowercase).

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 29, 2022, 12:47am UTC](https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195/22 "2022-04-29T00:47:13Z")

</div>

It is possible, but ExpandingMan’s guide actually refers to it as `Upper camel-case’.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [April 29, 2022, 11:15am UTC](https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195/23 "2022-04-29T11:15:16Z")

</div>

I was speaking more generally than Julia, but still in Julia… if UpperCamelCase (or PascaleCase) is used for structs/consts, why not keep the same convention with camelCase for the other variables instead of using `_` ? (but again, more in general I see more and more usage of underscores than camelcases)

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 29, 2022, 2:24pm UTC](https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195/24 "2022-04-29T14:24:40Z")

</div>

I suppose the idea is to make the distinction very apparent. If PascalCase is used for module and type names, FULL\_UPPERCASE is used for the name of constants, and snake\_case is used for variables/field and function names, then it is very apparent to what you are looking just by the casing of the identifier. We could probably blend camelCase into the mix attributing it to some group of identifiers. However, I find camelCase kinda awkward, it is strange to use it for identifiers that may start with an acronym (or continue to one), it is indistinguishable of snake\_case if the identifier has only one word, and it is slightly less readable (but not much). So, I believe the main problem is that is kinda of a choice if you gonna have snake\_case or camelCase (because of one-word identifiers the two do not coexist well), and snake\_case ended up winning the fight.

[Previous page](https://discourse.julialang.org/t/is-there-a-julia-style-guide/80195.md?page=1)
