[Ecls-list] Function and variable names

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Fri Jan 19 14:17:32 UTC 2007


2007/1/19, Peter Van Eynde <pvaneynd at mailworks.org>:
> On Thursday 18 January 2007 21:48, Jyrki Jaakkola wrote:
> > Most older compilers has this limit but I haven't checked how it's with
> > newer compilers. As far as I know even those which had the limit would
>
> From: http://www.25hoursaday.com/C99.html
> "Increased identifier size limits: specifically 63 significant initial
> characters in an internal identifier or macro name, 31 significant initial
> characters in an external identifier, and 4095 characters in a logical source
> line. These values were 31, 6, and 509, respectively, in C89."

These are the vaules I had in mind: 31 or 32 significant characters.
However, it seems a bit absurd these days of C++ domination. Most C++
compilers encode all type information in mangled names and this means
linkers must support at least much longer character names.

I see two possibilities:

* Add a prefix, perhaps "ecl_", to all functions. Ensure that all
functions in the core are within the limits and impose that the name
of functions exported by other modules must be supplied by users.

* Stay as we are. Supply ECL also as a C++ library, which people with
special needs can use. In this version, ECL would be encaged within
its own namespace, "ecl". We move on the problem to the C++
compiler/linker.

Static functions generated by the lisp->C compiler are not a big
problem, as their name is never exported and we can instruct the
translator to generate meaningful, not repeating names.

Juanjo

-- 
Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 2804 (Spain)
http://teorica.fis.ucm.es/~jjgarcia/




More information about the ecl-devel mailing list