In this study, children, young adults and elderly adults were tested in production and comprehension tasks assessing referential choice. Our aims were (1) to determine whether speakers egocentrically base their referential choice on the preceding linguistic discourse or also take into account the perspective of a hypothetical listener and (2) whether the possible impact of perspective taking on referential choice changes with increasing age, with its associated changes in cognitive capacity. In the production task, participants described picture-based stories featuring two characters of the same gender, making it necessary to use unambiguous forms; in the comprehension task, participants interpreted potentially ambiguous pronouns at the end of similar orally presented stories. Young adults (aged 18-35) were highly sensitive to the informational needs of hypothetical conversational partners in their production and comprehension of referring expressions. In contrast, children (aged 4-7) did not take into account possible conversational partners and tended to use pronouns for all given referents, leading to the production of ambiguous pronouns that are unrecoverable for a listener. This was mirrored in the outcome of the comprehension task, where children were insensitive to the shift of discourse topic marked by the speaker. The elderly adults (aged 69-87) behaved differently from both young adults and children. They showed a clear sensitivity to the other person's perspective in both production and comprehension, but appeared to lack the necessary cognitive capacities to keep track of the prominence of discourse referents, producing more potentially ambiguous pronouns than young adults, though fewer than children. In conclusion then, referential choice seems to depend on perspective taking in language, which develops with increasing linguistic experience and cognitive capacity, but also on the ability to keep track of the prominence of discourse referents, which is gradually lost with older age.