Skip to content

Instantly share code, notes, and snippets.

@hhutch
Created August 6, 2015 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hhutch/ea2496e23add73deb12e to your computer and use it in GitHub Desktop.
Save hhutch/ea2496e23add73deb12e to your computer and use it in GitHub Desktop.
great cross-language explanation of a tuple
bhuga_is_too_long_to_ [8:26 PM]
there is no limit to the number of things in a tuple. they are indeed the same as an array
bhuga_is_too_long_to_ [8:27 PM]
tuple is just a word that expresses that the array is expected to have a given length (2-tuple, 3-tuple, 4-tuple, etc), and that each element of the array is of an expected type in an expected location
bhuga_is_too_long_to_ [8:27 PM]
you can make a tuple type out of this concept, wrapping the array. nothing wrong with that either
bhuga_is_too_long_to_ [8:28 PM]
and they make life easier by being less bureaucracy than a proper type with n-members
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment