# Computing tuple replacements

**URL:** https://discourse.julialang.org/t/computing-tuple-replacements/69581
**Category:** New to Julia
**Tags:** tuple
**Created:** [October 11, 2021, 6:49pm UTC](https://discourse.julialang.org/t/computing-tuple-replacements/69581 "2021-10-11T18:49:46Z")
**Posts on this page:** 1
**Showing post:** 19

<div class="post-metadata">

### Author: ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)
#### Post date: [October 21, 2021, 9:08pm UTC](https://discourse.julialang.org/t/computing-tuple-replacements/69581/19 "2021-10-21T21:08:05Z")

</div>

Related discussion of `@code_warntype` here:

> [@Type stability of indexing a tuple in local scope vs global scope](https://discourse.julialang.org/t/type-stability-of-indexing-a-tuple-in-local-scope-vs-global-scope/70007/2):
>
> The behavior of @code\_warntype makes a bit more sense if you look at what it’s actually doing: julia\> @macroexpand @code\_warntype t[1] :(InteractiveUtils.code\_warntype(getindex, (Base.typesof)(t, 1))) julia\> Base.typesof(t, 1) Tuple{Tuple{Int64, Float64}, Int64} So @code\_warntype is just calling the regular function code\_warntype with the types of t and 1, which are Tuple{Int64, Float64} and Int64, respectively. That means code\_warntype has only access to the type of 1, not the constant valu…

---

_[View the full topic](https://discourse.julialang.org/t/computing-tuple-replacements/69581)._
