The point of the example is that the correct parsing of the second sentence, "fruit flies like a banana", is not the one that the reader starts to build, by assuming that "fruit" is a noun, "flies" is the main verb, and "like" as a preposition. The reader only discovers that the parsing is incorrect when it gets to the "banana". At that point, in order to make sense of the sentence, the reader is forced to re-parse it, with "flies" as the subject, "fruit" as a qualifier of "flies", and "like" as the main verb. Additionally, the insects known as "fruit flies" do indeed enjoy bananas, adding yet another valid reading of the sentence. The role of the first sentence is to predispose the reader towards the incorrect parsing of the second one. However, after re-parsing the second sentence, the reader presumably becomes aware that the first sentence too could be re-parsed in the same way. The sentence "time flies like an arrow" is in fact often used to illustrate syntactic ambiguity. Modern English speakers understand the sentence to unambiguously mean "Time passes fast, as fast as an arrow travels". But the sentence is syntactically ambiguous and alternatively could be interpreted as meaning, for example:
Measure the speed of flies like you would measure the speed of an arrow—i.e. time flies as you would time an arrow.
Measure the speed of flies using methods that an arrow would use—i.e. time flies in the same manner that an arrow would time them.
Measure the speed of flies with qualities resembling those of arrows—i.e. time those flies that are like an arrow.
Certain flying insects, called "time flies", enjoy an arrow.
In addition, the sentence contains semantic ambiguity. For instance, the noun phrase "Time flies" could refer to all time flies or particular time flies, and "an arrow" to all arrows, a particular arrow, or different arrows for different flies; compare "Fruit flies like a banana", "Fruit flies ate a banana", "Fruit flies live on a banana". Moreover, "Time flies" could refer to "flies of the Time magazine", or "flies of the Pink Floyd song Time". Furthermore, "like" as a verb could either signify general enjoyment, or the usage of a like button.
History
The expression is based on the proverb: "Time flies", a translation of the Latin Tempus fugit, where "fly" is to be taken in the sense of flee. An early example of a pun with the expression "Time flies" may be found in a 1930 issue of Boys' Life:
;Flies Around Anthony Oettinger gives "fruit flies like bananas" as contrasted with "time flies like an arrow" as an example of the difficulty of handling ambiguous syntactic structures as early as 1963, although his formal publications with Susumu Kuno do not use that example. This is quoted by later authors. A fuller exposition with the banana example appeared in a 1966 article by Oettinger. This article prompted the following response in a letter:
Time FliesLike an Arrow An Ode to Oettinger Now, thin fruit flies like thunderstorms, And thin farm boys like farm girls narrow; And tax firm men like fat tax forms – But time flies like an arrow. When tax forms tax all firm men's souls, While farm girls slim their boyfriends' flanks; That's when the murd'rous thunder rolls – And thins the fruit flies ranks. Like tossed bananas in the skies, The thin fruit flies like common yarrow; Then's the time to time the time flies – Like the time flies like an arrow. — Edison B. Schroeder
The verse is popular as a specimen of didactic humor trading on syntactic ambiguity. Like the poem The Chaos, by Gerard Nolst Trenité, its themes are popular among practitioners and students in fields such as natural language processing and linguistics.
Other attributions
The saying is sometimes attributed to Groucho Marx, but the earliest attribution to him dates only to 1982, and there is no reason to believe he actually said it.
Use in linguistics
The saying is used as a linguistic example of antanaclasis, the stylistic trope of repeating a single word, but with a different meaning each time. It is also used as an example of punning. The wordplay is based on the distinct meanings of the two occurrences of the wordflies, and of the word like. For example, the second clause can be read as "fruit travels through the air similar to a banana" or as "certain insects enjoy a banana". This is an example of a garden-path sentence, a phrase that the reader or listener normally begins to parse according to one grammatical structure, and is then forced to back up and reparse when the sentence ends in an unexpected way.