[Gretl-users] Replay on case-sensivity

Allin Cottrell cottrell at wfu.edu
Sat Apr 18 15:59:24 EDT 2009

Here's a more extended reply to Berend Hasselman's posts on
case-sensitivity with regard to variable names in gretl.

First, I've now modified the Find dialog for the gretl main window
so that it gives the option of a case-sensitive search on variable
names only.  (I suppose a common use of this dialog is to find
strings anywhere in the window, including in the descriptions of
variables, in which case a case-insensitive search is

Now to Berend's request that gretl should ignore case when
handling variable names.  One point to be made here is that this
would be a backward-incompatible change, and a rather devastating
one: I know that it would break a _lot_ of the gretl scripts on my
system.  That's not a killer argument for staying with the status
quo, but it means there has to be a rather compelling reason for

I don't see a compelling reason; in fact, I think that on balance
the argument for case sensitivity outweighs the arguments against
(disregarding the compatibility issue).

As I see it there are three possible arguments for ignoring case:

(1) Case sensitivity can make it inconvenient to deal with
third-party datasets that use mixed case for variable names.  It
would be more convenient if one could assume that when "foobar" is
typed in gretl this will automatically map onto a variable named
"FooBar" in imported data.

Comment: Granted, this can be a (minor) inconvenience.  But any
decent text editor has an option to adjust the case of selected
text, so for plain text data files this shouldn't really be an
issue.  It _might_ be worth adding an option in gretl to convert
all variable names to lower case.

(2) The possibility of having variables whose names differ only in
respect of case creates potential for confusion: how to keep
"cpi", "CPI" and "Cpi" straight?

Comment: Use a sane policy in naming variables (but see below).

(3) Users of MS Windows are unused to case sensitivity and may
find the effects surprising.

Comment: Yes, but it doesn't take long to learn.

Now here's the positive argument in favour of case sensitivity.
The issue of "sensitive or not" mostly arises in the context of
scripts, where variable names have to be typed rather than
"clicked on".  That is, it mostly arises when gretl is being used
as a programming language.  OK, programming languages differ with
regard to case sensitivity, but many of the best and most
widespread ones respect case (C and Java, for instance).  And in
an econometric context it seems to me very natural to expect case
sensitivity, as one finds it in mathematical notation.  Here are
just a few examples:

t = time index; T = maximum value of t
i = index variable; I = identity matrix
Y = output; y = log of output
m = scalar; M = matrix

People's expectations may differ, but I would very definitely not
want to see these uses of case broken.

Allin Cottrell
Department of Economics
Wake Forest University

More information about the Gretl-users mailing list