Glossary

Blurb

This is any text of little value or interest.

CM

This stands for the SML/NJ Compilation Manager. It also refers to the input files used by the manager.

CML

This is the Concurrent ML library. It adds operations for concurrent programming to SML/NJ.

continuation

A continuation is a virtual function that represents the rest of the computation of the program. By virtual I mean that it is behaves like a function that can be called from SML but underneath it just represents a transfer of control to other parts of the program.

copy by reference

When a data object is copied by reference the object itself is not duplicated. Instead a pointer to it is created. The copy and the original share the same memory locations. A change made to the original will result in the copy changing too.

See Also: copy by value.

copy by value

When a data object is copied by value the object itself is duplicated. The copy and the original occupy different memory locations. A change made to the original will not result in a change to the copy.

See Also: copy by reference.

currying

This refers to how a function with multiple inputs can be treated as a cascade of functions each called with a single input. For example the expression (f a b) means (g b) where g = (f a).

datatype

This is a kind of type declaration in SML. It plays the role of enumeration and union types of C or C++.

dynamic

This refers to any information that cannot be known about a program until it is running. The information depends on the data it is processing.

See Also: static.

finalisation

This is a post-processing step applied to a data object after it has been collected by the garbage collector. For example a file object should be finalised by closing it since it can no longer be used by the program.

See Also: garbage collector.

functional programming

This style of programming proceeds by computing new values from existing values without changing any of the existing values.

See Also: imperative programming, pure function.

functor

This is a generic module in SML. It can be thought of as a function that generates a structure from one or more input structures.

See Also: generic, module, structure.

garbage collector

This is a part of the SML/NJ run-time that locates data objects that can no longer be used and makes their memory available for reuse.

generic

A piece of code is generic if it can be easily customised in the language to different kinds of input. This is similar to the idea of polymorphism but it handles a wider variety of kinds. The functor is the mechanism in SML for writing generic code. Templates are the corresponding mechanism in C++.

See Also: functor.

immutable

A variable is immutable if the value it represents can never change. This is normal for functional programs. In imperative programs variables are normally mutable.

See Also: functional programming.

imperative programming

This style of programming proceeds by altering values stored in variables.

See Also: functional programming, sneak path.

lex

This is the traditional lexical scanner generator available on Unix.

See Also: yacc.

live data

Any piece of data that can still be used by the program is called live. Dead data will eventually be collected by the garbage collector.

See Also: garbage collector.

mickey-mouse

A toy example.

module

In SML this refers to either a structure or a functor. The compiler compiles modules separately.

See Also: structure, functor.

monomorphic

A function is monomorphic if it only operates on data of one type. For example the String.concat function only concatenates lists of strings.

See Also: polymorphic.

polymorphic

A function is polymorphic if it performs the same operation on a family of types. For example the List.length function determines the length of any list without regard to the type of its elements.

See Also: monomorphic.

primitive

This refers to something at the lowest level of detail; elemental. For example to a program, addition is a primitive operation of the hardware. Although from the point of view of the hardware it may be complex.

pure function

A pure function always produces the same result for the same explicit inputs. Its behaviour is not dependent on some program state that can vary between calls to the function.

See Also: functional programming.

reference type

This is a kind of type in SML. Values of this type are mutable variables.

run-time

This refers to the part of the SML/NJ system that is written in C and shared by all SML/NJ programs.

SML

This is an abbreviation for Standard ML.

See Also: SML/NJ, CML.

SML/NJ

This is the New Jersey implementation of the Standard ML language.

See Also: SML.

stdin, stdout, stderr

These are the predefined UNIX file descriptors: standard input, standard output and standard error.

signature

In SML this is a collection of declarations for types and values that a structure exports to the rest of the program.

sneak path

This is what I call it when two parts of a program communicate by reading and writing a shared variable in some obscure way. An example in C would be if two functions in different files passed data through a global variable.

static

This refers to any information that is known about a program before it is run.

See Also: dynamic.

strong pointer

This is a pointer (or reference) to a data object that is taken seriously by the garbage collector. If an object has one or more strong pointers to it then is considered to be live.

See Also: weak pointer, live data.

structure

In SML this is a named collection of declarations.

See Also: module, functor.

tuple

In SML, this is a group of anonymous data values travelling together. The word is a generalisation of the sequence: couple, triple, quadruple, quintuple, sextuple etc.

weak pointer

This is a pointer (or reference) to a data object that is not taken seriously by the garbage collector. If an object only has weak pointers to it then it is no longer considered to be live.

See Also: live data, strong pointer.

yacc

This is the traditional parser generator available on Unix. The name stands for Yet Another Compiler Compiler. A compiler compiler is a mythical tool that generates a compiler for a programming language given a description of the language. They were a hot topic in computer science in the 1960s and 1970s.

See Also: lex.