Check out the new USENIX Web site. next up previous
Next: Implementation Features Up: Names, Lifetimes, Types and Previous: Types

Values

Nickle supports first-class structured values. Any value of any type may be created and used in any legal expression context. This is important for a language designed for a desk calculator. It also allows the programmer to determine which values in the program need to be named, instead of being forced to produce names by the language semantics.

For example, an anonymous array can be created whenever needed, and treated just like any other array object. In this example, a two-element string array is created and then dereferenced:

  > ((string[*]){"a","b"})[1]
  "b"



Bart Massey 2001-04-19