# Does it make any sense to define a new type name as const?

**URL:** <https://discourse.julialang.org/t/does-it-make-any-sense-to-define-a-new-type-name-as-const/44657>\
**Category:** General Usage\
**Created:** [August 10, 2020, 2:20am UTC](https://discourse.julialang.org/t/does-it-make-any-sense-to-define-a-new-type-name-as-const/44657 "2020-08-10T02:20:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauljurczak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pauljurczak/32/921_2.png) [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Post date:** [August 10, 2020, 2:20am UTC](https://discourse.julialang.org/t/does-it-make-any-sense-to-define-a-new-type-name-as-const/44657/1 "2020-08-10T02:20:40Z")

</div>

I want to use a shorthand for a type name. Which of these two options should I go with?

```julia
Vec2f = SVector{2, Float32}
const Vec2f = SVector{2, Float32}

```

---

<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:** [August 10, 2020, 2:26am UTC](https://discourse.julialang.org/t/does-it-make-any-sense-to-define-a-new-type-name-as-const/44657/2 "2020-08-10T02:26:54Z")

</div>

If this is in global scope, use `const`. Otherwise, do not use `const` because it is not implemented for local scope yet (unless I missed the memo).

---

<div class="post-metadata">

**Author:** ![longemen3000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/longemen3000/32/7298_2.png) [@longemen3000](https://discourse.julialang.org/u/longemen3000)\
**Post date:** [August 10, 2020, 2:47am UTC](https://discourse.julialang.org/t/does-it-make-any-sense-to-define-a-new-type-name-as-const/44657/3 "2020-08-10T02:47:00Z")

</div>

[quote=“Henrique\_Becker, post:2, topic:44657, full:true”]  
apart from the global scope aspect, is fine. in fact, `Vector{x}` is defined as a constant too
