# Syntax for putting constraints on type

**URL:** <https://discourse.julialang.org/t/syntax-for-putting-constraints-on-type/79588>\
**Category:** New to Julia\
**Tags:** type, parametric-types\
**Created:** [April 17, 2022, 3:28am UTC](https://discourse.julialang.org/t/syntax-for-putting-constraints-on-type/79588 "2022-04-17T03:28:53Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![sychen52](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sychen52/32/34072_2.png) [@sychen52](https://discourse.julialang.org/u/sychen52)\
**Post date:** [April 18, 2022, 5:19am UTC](https://discourse.julialang.org/t/syntax-for-putting-constraints-on-type/79588/14 "2022-04-18T05:19:07Z")

</div>

I used to think StaticArray, which is a subtype of AbstractArray, is stack-allocated. However, After reading [this](https://discourse.julialang.org/t/staticarrays-and-allocations/62123/20), I realize Julia does not guarantee either stack or heap allocation.  
But I feel it is also not guaranteed to be on the heap as you mentioned.

---

_[View the full topic](https://discourse.julialang.org/t/syntax-for-putting-constraints-on-type/79588)._
