[Gretl-devel] Regarding long variable names

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Mon Oct 29 08:02:01 EDT 2007


On Mon, 29 Oct 2007, andreas.rosenblad at ltv.se wrote:

> Would it be terribly difficult to let gretl allow longer variable lengths?
> For example, function names are allowed to have 31 characters. Couldn't
> variable names also be allowed to have 31 characters?

In theory, it would be easy-peasy. If you can build from the source, all 
you need to do is edit line 78 in lib/src/libgretl.h and change the 
definition of VNAMELEN from 16 to whatever you like. In practice, it's 
hard to figure out the number of places in the code in which we used the 
number 16 instead of "VNAMELEN" (or worse, 15 instead of "VNAMELEN-1"). 
The check is doable, but it's time-consuming, boring and error-prone[*]. 
Since this change may trigger all sorts of unintended consequences it 
would be IMHO very unwise to risk introducing some subtle bug just because 
of this.

That said, I'm personally in favour of longer identifiers, but not for the 
next release.

[*] However, it would be a perfect task for someone who wants to get 
involved in development, but can't code in C, since in most cases it 
should be quite simple to figure out if the "16" is supposed to be the 
length of a variable name or something else.


Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche

r.lucchetti at univpm.it
http://www.econ.univpm.it/lucchetti


More information about the Gretl-devel mailing list