# Could you implement Linear Types in Julia?

**URL:** <https://discourse.julialang.org/t/could-you-implement-linear-types-in-julia/124556>\
**Category:** General Usage\
**Created:** [January 8, 2025, 11:17pm UTC](https://discourse.julialang.org/t/could-you-implement-linear-types-in-julia/124556 "2025-01-08T23:17:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Mastermage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/the_mastermage/32/49444_2.png) [@The\_Mastermage](https://discourse.julialang.org/u/The_Mastermage)\
**Post date:** [January 8, 2025, 11:17pm UTC](https://discourse.julialang.org/t/could-you-implement-linear-types-in-julia/124556/1 "2025-01-08T23:17:56Z")

</div>

I was watching the video [2024 LLVM Dev Mtg - Implementing Linear / Non-destructible Types in Vale and Mojo](https://www.youtube.com/watch?v=IpuvQUVB8Cg) by on of the Devs developing Mojo and Vale (which is really cool btw. check it out). And he was talking about Linear Types and one of the things I liked very much about Linear Types is that it allows to encode to the compiler a way to ensure certain methods are called before the end of the scope. (Hopefully i understood this correctly)  
I was interested if someone came along a way to implement this in Julia. I know that for the most part we do not actualy deallocate or destroy objects manually. But I like the potential to check whether certain methods on types were called before the end of the scope.
