Check out the new USENIX Web site. next up previous
Next: Performance Up: Related Work Previous: What Nickle Is Not

Comparison With Other Languages

Given the design goal for Nickle--a language for desk calculation and prototyping of numerical and semi-numerical algorithms--it is constructive to compare its feature set and implementation properties with those of a few of the languages listed above.

First and foremost, unlike all of the languages listed above except certain Scheme implementations, Nickle supports a wide variety of exact or highly precise numeric types, organized in a sensible fashion and properly checked statically and dynamically. The true power of Nickle is not apparent until one tries to add up 10,000 probabilities, and finds that in Nickle they sum to 1; not 0.998 or 1.02, but just plain 1. The ability to select the mantissa precision for floating point computation is similarly useful: it is notable that Nickle is quite usably fast with the default mantissa precision of 256 bits.

A more fair comparison is with R5RS or later Scheme implementations supporting the full numeric model. Such an implementation provides a quite usable calculator and programming language, comparable in some ways to Nickle. The principal differences here include the C-like syntax (indeed, any syntax at all), the static type system, namespaces, structures, etc., all of which ease the sort of programming at which Nickle is aimed. (The lack of built-in list support is a missed feature, as noted above.)

ML has the potential to do much of what Nickle does. Its support for functional programming is obviously far superior to Nickle's, and its syntax, type system, and the like are comparable. The learning curve for ML tends to be fairly steep by most accounts. The experience of the authors is that C programmers pick up Nickle immediately, not just because of the C-like syntax, but also because of the first-class support for imperative programming: Nickle does not try to change one's programming paradigm. Of course, the support for numeric types in Nickle is also superior to that of any ML implementation of which the authors are aware.

Some interest has been expressed in the relationship between Nickle and Perl. First and foremost, as noted above, Perl, sed and AWK are aimed primarily at text processing, and are well-suited to this sort of task. The support for numeric programming in Perl is limited: until recently, the only numeric representation supported was IEEE floating point numbers. In addition, the complex syntax and semantics of the language tends to make for a steep learning curve even for experienced programmers [Sch93]. Finally, Perl's complicated system of types and values is somewhat error-prone [McC01] and contains little support for static typing.

next up previous
Next: Performance Up: Related Work Previous: What Nickle Is Not
Bart Massey 2001-04-19