Previous: Dynamic Extensions, Up: Notes


C.4 Probable Future Extensions

AWK is a language similar to PERL, only considerably more elegant.
Arnold Robbins

Hey!
Larry Wall

This section briefly lists extensions and possible improvements that indicate the directions we are currently considering for gawk. The file FUTURES in the gawk distribution lists these extensions as well.

Following is a list of probable future changes visible at the awk language level:

Loadable module interface
It is not clear that the awk-level interface to the modules facility is as good as it should be. The interface needs to be redesigned, particularly taking namespace issues into account, as well as possibly including issues such as library search path order and versioning.
RECLEN variable for fixed-length records
Along with FIELDWIDTHS, this would speed up the processing of fixed-length records. PROCINFO["RS"] would be "RS" or "RECLEN", depending upon which kind of record processing is in effect.
Databases
It may be possible to map a GDBM/NDBM/SDBM file into an awk array.
More lint warnings
There are more things that could be checked for portability.

Following is a list of probable improvements that will make gawk's source code easier to work with:

Loadable module mechanics
The current extension mechanism works (see Dynamic Extensions), but is rather primitive. It requires a fair amount of manual work to create and integrate a loadable module. Nor is the current mechanism as portable as might be desired. The GNU libtool package provides a number of features that would make using loadable modules much easier. gawk should be changed to use libtool.
Loadable module internals
The API to its internals that gawk “exports” should be revised. Too many things are needlessly exposed. A new API should be designed and implemented to make module writing easier.
Better array subscript management
gawk's management of array subscript storage could use revamping, so that using the same value to index multiple arrays only stores one copy of the index value.

Finally, the programs in the test suite could use documenting in this Web page.

See Additions, if you are interested in tackling any of these projects.