Pronouns a new name for an old idea

https://news.ycombinator.com/item?id=28936620
by daly • 5 years ago
5 12 5 years ago

In a sentence in natural language a thing can be referenced. The dictionary defines a 'pronoun' as

"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".

Related Stories

Loading related stories...

Source preview

news.ycombinator.com