# Array of tuples

**URL:** <https://discourse.julialang.org/t/array-of-tuples/11435>\
**Category:** New to Julia\
**Tags:** array, tuple\
**Created:** [June 5, 2018, 7:47am UTC](https://discourse.julialang.org/t/array-of-tuples/11435 "2018-06-05T07:47:18Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [June 5, 2018, 1:32pm UTC](https://discourse.julialang.org/t/array-of-tuples/11435/7 "2018-06-05T13:32:17Z")

</div>

> [@jcrbloch](#):
>
> The original cause of my problem is that a function returning multiple values automatically returns them in a tuple. If they would be returned in an array, nothing of this would happen.

Returning an array would be _much_ more expensive than returning a tuple, as an array has a significant amount of overhead compared to a tuple (which can be exactly zero-overhead in many circumstances), which is why it’s not done. Also, I’m not convinced that that would help in your case anyway, as a vector-of-vectors is still a completely different structure than a 2D matrix, and something like `A[:][1]` would not work even if each element of `A` were a vector.

Maybe you can describe more about what the actual problem you’re trying to solve is?

---

_[View the full topic](https://discourse.julialang.org/t/array-of-tuples/11435)._
