# Lost type information in nested tuples?

**URL:** https://discourse.julialang.org/t/lost-type-information-in-nested-tuples/10253
**Category:** General Usage
**Created:** [April 10, 2018, 1:36am UTC](https://discourse.julialang.org/t/lost-type-information-in-nested-tuples/10253 "2018-04-10T01:36:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bramtayl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bramtayl/32/3614_2.png) [@bramtayl](https://discourse.julialang.org/u/bramtayl)
#### Post date: [April 10, 2018, 1:36am UTC](https://discourse.julialang.org/t/lost-type-information-in-nested-tuples/10253/1 "2018-04-10T01:36:14Z")

</div>

Zips of several items result in iterator states which are nested tuples. I have a line in my code\_warntype which looks like this:

```julia
s@_7::Tuple{Int64,Tuple{Int64,Tuple{Int64,Tuple{Int64,Tuple}}}} = (Base.Iterators.tuple)(1, (Base.Iterators.tuple)(1, (Base.Iterators.tu
ple)(1, (Core.tuple)(1, (Core.tuple)(itr@_8::Base.OneTo{Int64}, 1)::Tuple{Base.OneTo{Int64},Int64})::Tuple{Int64,Tuple{Base.OneTo{Int64},Int64
}})::Tuple{Int64,Tuple{Int64,Tuple{Base.OneTo{Int64},Int64}}})::Tuple{Int64,Tuple{Int64,Tuple{Int64,Tuple{Base.OneTo{Int64},Int64}}}})::Tuple{
Int64,Tuple{Int64,Tuple{Int64,Tuple{Int64,Tuple{Base.OneTo{Int64},Int64}}}}}

```

What seems to be going on is because the type is so nested that inference gives up? Is that what’s actually happening? If it is the case it means that zips of more than 4 or 5 things will be type unstable. Does that mean that we need a new version of zip that doesn’t need so many nested types? Or will the new optimizer take care of it?

Note this is on 0.6.

---

<div class="post-metadata">

### Author: ![bramtayl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bramtayl/32/3614_2.png) [@bramtayl](https://discourse.julialang.org/u/bramtayl)
#### Post date: [April 10, 2018, 1:41am UTC](https://discourse.julialang.org/t/lost-type-information-in-nested-tuples/10253/2 "2018-04-10T01:41:37Z")

</div>

PS why are zips implemented as a nested tuple of iterators rather than just a tuple of iterators?
