Limbo

Appeared in:
1995
Influenced by:
Paradigm:
Typing discipline:
File extensions:
.b
Versions and implementations (Collapse all | Expand all):
Programming language

Limbo is a programming language for writing distributed systems and is the language used to write applications for the Inferno operating system. It was designed at Bell Labs by Sean Dorward, Phil Winterbottom, and Rob Pike.

The Limbo compiler generates architecture-independent object code which is then interpreted by the Dis virtual machine or compiled just before runtime to improve performance. Therefore all Limbo applications are completely portable across all Inferno platforms.

Limbo supports the following features:

  • modular programming
  • concurrent programming
  • strong type checking at compile- and run-time
  • interprocess communication over typed channels
  • automatic garbage collection
  • simple abstract data types.

Limbo offers an advanced selection of primitive data types:

  • byte (8-bit unsigned)
  • int (32-bit signed)
  • big (64-bit signed)
  • real (64-bit floating point)
  • list
  • array (with slicing)
  • string
  • tuple (ordered collection of types)
  • channel (for inter-process communication)
  • adt (C like struct)
  • pick (discriminated union type)
  • module

Limbo debugger in Inferno OS
Limbo debugger in Inferno OS

Examples:

Hello, World!:

Example for versions Inferno Limbo 20100115
implement Hello;
include "sys.m";
	sys: Sys;
include "draw.m";

Hello: module {
	init: fn(nil: ref Draw->Context, argv: list of string);
};

init(nil: ref Draw->Context, argv: list of string)
{
	sys = load Sys Sys->PATH;
	sys->print("Hello, World!\n");
}