"a word that can function by itself as a noun phrase and that refers either to the participants in the discourse (e.g., I, you ) or to someone or something mentioned elsewhere in the discourse (e.g., she, it, this )."
In programming we often find that we have "variables with local scope" that are used within a block. They "refer" to other things. In Lisp, for instance, a LET construct will create local variables that disappear on exit:
(defun foo (x) (let ((y (first x))) ....
in C it might be
void foo (x) int y = first(x); ...
Here 'y' is local.
Rather than calling these "variables with local scope" I suggest we call them "pronouns".