[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Flush the term upvalue from 5.1 manual
- From: Boyko Bantchev <boykobb@...>
- Date: Wed, 23 Nov 2005 12:14:09 +0200
On 11/22/05, Chris Marrin <firstname.lastname@example.org> wrote:
> I think upvalue is a completely reasonable and clear term. Any
> terminology used will be obtuse to those new to the language. So it is
> better to have a short and easy-to-remember. I find "inherited binding
> reference" to be at least as obtuse as upvalue :-)
For the record, the only place except Lua that I find the word
`upvalue' in use is Mathematica, where there are `downvalues'
However, Mathematica's use of `upvalue' is different.
The term `non-local variable' is a bit longer but often used in
other languages for what an upvalue is in Lua: a variable which
is neither local to a function being considered, nor global, i.e.
one that is local in an outer context. Moreover, this use of
`non-local' is consistent with `non-local exits' in other languages
(and in a proposal of Rici Lake some time ago in this list).
That said, I am not advocating that Lua changes its preferred
terminology -- it is the right of Lua's authors and maintainers
to choose it. Were it, say, `green' in place of upvalue, I would
also be happy, provided a clear, unambiguous definition of
`green' is given :)