# Use of \`global\` in a module for global variable is pointless?

**URL:** <https://discourse.julialang.org/t/use-of-global-in-a-module-for-global-variable-is-pointless/123669>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [December 10, 2024, 4:19pm UTC](https://discourse.julialang.org/t/use-of-global-in-a-module-for-global-variable-is-pointless/123669 "2024-12-10T16:19:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![world-peace](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@world-peace](https://discourse.julialang.org/u/world-peace)\
**Post date:** [December 10, 2024, 4:19pm UTC](https://discourse.julialang.org/t/use-of-global-in-a-module-for-global-variable-is-pointless/123669/1 "2024-12-10T16:19:52Z")

</div>

A quick query about the use of `global` in a module.

```julia
module MyModule

global gTest = nothing

end

```

```julia
module MyModule

gTest = nothing

end

```

I think these two codes are exactly identical with no difference between them. Is that correct?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 10, 2024, 4:26pm UTC](https://discourse.julialang.org/t/use-of-global-in-a-module-for-global-variable-is-pointless/123669/3 "2024-12-10T16:26:17Z")

</div>

Yes.
