Check out the new USENIX Web site. next up previous
Next: Experience With Nickle Up: Nickle: Language Principles and Previous: History

The Nickle Implementation

Nickle's current implementation consists of about 25,000 lines of C code in about 45 files, together with about 1000 lines of builtins written in Nickle itself. Great attention has been paid to modularity in the implementation: the current structure is the result of literally years of refactoring and reorganization effort. The rough breakdown of the implementation is as follows:

The remainder consists of miscellaneous support routines.

As noted above, the implementation uses a highly stereotyped interface to the garbage collector, which allows the C code to easily allocate and reference storage in the Nickle heap. Since this strategy was perfected, memory reference errors in the C infrastructure of the implementation have become extremely rare. Of course, the increasing maturity of the implementation is also a factor here.

Because of the ease of memory management and the extreme modularity, adding new C code to the Nickle implementation is quite easy, even for someone not overly familiar with the internals. As mentioned above, this is one reason why the lack of a native-code interface as part of the Nickle programming language is regarded as unobjectionable. Massey has added C builtins to the implementation on a couple of occasions, and has found the overhead due to learning curve and extra code requirements to be on the order of a few hours. It is not clear that this could be improved with a JNI-style builtin native interface. Portability is an issue, however: the integrated C code should be able to run on arbitrary UNIX (at least) platforms.


next up previous
Next: Experience With Nickle Up: Nickle: Language Principles and Previous: History
Bart Massey 2001-04-19