Check out the new USENIX Web site. next up previous
Next: Numeric Features Up: Language Features Previous: Values

Implementation Features

The current implementation of Nickle is an interactive byte compiler, in the style of many Scheme implementations. All expressions and statements typed at the command line are rapidly compiled into an intermediate byte-code representation that is then evaluated in the compiled top-level context. The language is designed to support implementations using offline compilation to native code, for greater efficiency. While Nickle's predecessors were at one time pure interpreters, the current structure of the language would make such an implementation difficult, and offers no obvious advantages.

The statement syntax of Nickle, as with C, is essentially that of infix expressions, lending itself to scratch-pad-style calculation. Full interactive compilation and first-class support for all values means that it is quite easy to interact with and modify Nickle code written online, to develop new code online, and to calculate interactively in this environment. The easy loading and import of appropriate namespaces allows a custom calculation environment to be quickly set up.

Many of the features of Nickle are predicated upon the existence of automatic storage management. The Nickle implementation includes a tracing mark-sweep garbage collector, which is used in two principal ways. First, storage is implicitly allocated for Nickle objects during definition. Second the C code that implements Nickle makes use of the garbage collector as a general-purpose storage allocator. This is facilitated by the non-copying nature of the collector, and by CPP macros which allow easy rooting of the garbage collector in a C frame.

next up previous
Next: Numeric Features Up: Language Features Previous: Values
Bart Massey 2001-04-19