What is Expressiveness in a Computer Language

Marshall marshall.spight at gmail.com
Fri Jun 23 12:32:13 EDT 2006


Andreas Rossberg wrote:
> Marshall wrote:
> >
> > What we generally (in programming) call variables are locals
> > and globals. If the languages supports an update operation
> > on those variables, then calling them variables makes sense.
> > But "variable" has become such a catch-all term that we call
> >
> >   public static final int FOO = 7;
> >
> > a variable, even though it can never, ever vary.
> >
> > That doesn't make any sense.
>
> It does, because it is only a degenerate case. In general, you can have
> something like
>
>    void f(int x)
>    {
>       const int foo = x+1;
>       //...
>    }
>
> Now, foo is still immutable, it is a local, but it clearly also varies.

So what then is to be the definition of "variable" if it includes
things that can never vary, because they are only a degenerate
case? Shall it be simply a named value?


Marshall




More information about the Python-list mailing list