Julia Language Tuples


  • a,
  • a, b
  • a, b = xs
  • ()
  • (a,)
  • (a, b)
  • (a, b...)
  • Tuple{T, U, V}
  • NTuple{N, T}
  • Tuple{T, U, Vararg{V}}


Tuples have much better runtime performance than arrays for two reasons: their types are more precise, and their immutability allows them to be allocated on the stack instead of the heap. However, this more precise typing comes with both more compile-time overhead and more difficulty achieving type stability.