Is "triple" the proper counterpart of pair when describing a group of three items?

I'm writing a tech doc and this question bothers me, though I know it should be simple.

I know I should say "A pair of [Key, Value]", but when I have something like "A ____ of [Key, Value, Flag]", I'm just not sure if the proper word is triple, or something else.

Is triple often used as an adjective instead of a noun? Is there a better word?


Solution 1:

If you were not writing in a technical context, an option is the noun, trio:

  1. [countable + singular or plural verb]

a group of three people or things

A trio of English runners featured in the women's 1500 metres.

However, for technical contexts triple is perfectly fine. You can use triple as a noun, as the Merriam Webster dictionary indicates. Wiktionary indicates that one of the few uses of triple as a noun is:

(mathematics, computing) A sequence of three elements or 3-tuple.

For your case, I would recommend triple because trio sounds a bit more hoity-toity. Both would be accurate, but I think triple carries the right tone. (For example, there are Pythagorean triples but not Pythagorean trios).

Solution 2:

A couple of related words are threesome and triad, both of which mean a group of three. In general, threesome is used for people and triad, for inanimate objects.

Solution 3:

triplet:

A set or succession of three similar things.

  • 'The reason why a triplet or quad of Aces is worth so few points is because they can be very easy to get.'
  • 'It constitutes a triplet, the first number representing the position, the second the wavelength and the third the transmission.'
  • 'DNA, RNA, and protein triplets or pairs were united on the basis of a high degree of similarity as detected by the appropriate blast algorithm or on the basis of annotation.'

(Oxford Dictionaries)

For some reason, nobody posted this as an answer yet even though Theta30 mentioned it in a comment in 2011.

Solution 4:

In exactly your technical context, the proper term is a "3‑tuple", also usable as just "tuple" in context. See Wikipedia. The term is common among mathematicians and functional programmers, and less so in the broader techie community, but still recognizable.

An added bonus is that you can have an "n‑tuple". Whenever you need one, a 5‑tuple or an 843‑tuple are just as fine. But then again, that "pair of [key, value]" is better expressed as a "2‑tuple of [key, value]" for the sake of consistency.

If you want a more layman-like term, I believe the good old "trio" would be appropriate.