# Suggestion --- Julia Version Header in .jl files

**URL:** <https://discourse.julialang.org/t/suggestion-julia-version-header-in-jl-files/16316>\
**Category:** Internals & Design\
**Created:** [October 14, 2018, 6:59pm UTC](https://discourse.julialang.org/t/suggestion-julia-version-header-in-jl-files/16316 "2018-10-14T18:59:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [October 14, 2018, 7:05pm UTC](https://discourse.julialang.org/t/suggestion-julia-version-header-in-jl-files/16316/4 "2018-10-14T19:05:19Z")

</div>

Seems like a good idea to me, I agree it could be useful. One thing you could do is write a macro or function that checks the julia version at the beginning, for example

```nohighlight
julia> check(version) = VERSION ≠ version && throw(error("wrong Julia version"))
check (generic function with 1 method)

julia> check(v"1.2.0")
ERROR: wrong Julia version
Stacktrace:
 [1] check(::VersionNumber) at ./REPL[3]:1
 [2] top-level scope at none:0

```

could throw an error if your Julia version is not correct. That’s one way I could see of doing it, if it does not end up being included in the `Base` language, you could open an issue on JuliaLang github page.

---

_[View the full topic](https://discourse.julialang.org/t/suggestion-julia-version-header-in-jl-files/16316)._
