I am defining some key words in my context of working.

I wrote this:

"Lists are ordered collection of arbitrary-typed data."

Is it correct to use a hyphen here?


In my context the word arbitrary is 100% fit my needs so I am not looking for a new word at all.

I am trying to say that the lists could contain data from many types

  • 2
    Either: Lists are ordered collections of arbitrarily typed data or A list is an ordered collection of arbitrarily typed data. – user6951 May 8 '15 at 14:20
  • Is the type arbitrary, or is the data arbitrary? – Karen May 8 '15 at 14:31
  • @Karen the type of the data is arbitrary. Ie. sometimes the type is integer, other times it is characters, other times it is doubles (floats) ... – Marco Dinatsoli May 8 '15 at 14:46
  • I don't think you can say that as in your question without being confusing. Better might be "Lists are ordered collection of data of arbitrary types." BTW, the info from your last comment should be added to your question so the context is clear. – user3169 May 8 '15 at 18:00

"Typed" here is an adjective. As I think your intent is that "arbitrary" is modifying "typed" and not "data", that is, the data is not arbitrary, but rather the typing of the data is arbitrary, you need an adverb. So you should say "arbitrarily typed data".

No hyphen is needed. You don't use a hyphen when using a conventional adverb-adjective-noun sequence. You only need a hyphen when you have a modifier that is not an adjective. This helps to prevent ambiguity. For example, "a fast moving truck" might mean a truck used for the purpose of moving that travels fast. Or "I found my long-lost ruler": the hyphen makes it clear that the ruler has been lost for a long time, and not that it is a long ruler that was lost. "Arbitrarily typed data" is unambiguous. "Arbitrarily" can only modify "typed" here, because "arbitrarily" is an adverb and an adverb cannot modify a noun directly.

| improve this answer | |
  • 1
    It's worth noting that when two or more coordinate adjectives modify the same noun, it's conventional to separate them with a comma (i.e. "a difficult, stubborn child"). See: Comma use case #6. – Luke May 8 '15 at 15:29
  • 1
    @LukeWillis Yes. A "fast, moving truck" is a truck that is fast and that is moving. A "fast-moving truck" is a truck that is moving fast. A "fast moving truck" is a truck for the purpose of moving that is fast. – Jay May 8 '15 at 17:19
  • 1
    I would use the hyphen, on the basis that a list of arbitrarily-typed data is not a list of data which have been arbitrarily typed, but rather a list that contains data that may have arbitrary types. To use an analogy, suppose I ask for a bunch of arbitrarily-colored flowers from a collection containing red roses, white carnations, and yellow daisies. The colors of the individual flowers would not be arbitrary, but would be determined by its type. The request, however, would indicate that there is no need to consider color in deciding whether a flower is eligible for inclusion. – supercat May 8 '15 at 21:19

I would favor use of the hyphen, on the basis that "arbitrarily-typed data" is not "data that is typed arbitrarily", but is instead a shorthand for "data which is not required to be of any particular type". Use of the phrase in that fashion would not be literally correct, since it will generally not be the typing of the data that was arbitrary, but rather the types of the data items that were included in the list. Nonetheless, English-speaking programmers will generally recognize the phrase "arbitrarily-typed" as being applicable to things that could be of any type, rather than to things which have had their types assigned arbitrarily.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.