Gawk/Old-Extension-Problems
From Get docs
Next: Extension New Mechanism Goals, Up: Extension Design [Contents][Index]
C.5.1 Problems With The Old Mechanism
The old extension mechanism had several problems:
- It depended heavily upon
gawk
internals. Any time theNODE
structure121 changed, an extension would have to be recompiled. Furthermore, to really write extensions required understanding something aboutgawk
’s internal functions. There was some documentation in this Web page, but it was quite minimal. - Being able to call into
gawk
from an extension required linker facilities that are common on Unix-derived systems but that did not work on MS-Windows systems; users wanting extensions on MS-Windows had to statically link them intogawk
, even though MS-Windows supports dynamic loading of shared objects. - The API would change occasionally as
gawk
changed; no compatibility between versions was ever offered or planned for.
Despite the drawbacks, the xgawk
project developers forked
gawk
and developed several significant extensions. They also
enhanced gawk
’s facilities relating to file inclusion and
shared object access.
A new API was desired for a long time, but only in 2012 did the
gawk
maintainer and the xgawk
developers finally
start working on it together. More information about the xgawk
project is provided in The gawkextlib
Project.