Template:Short description {{#invoke:other uses|otheruses}} Template:More citations needed Template:Infobox 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.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

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's approach to concurrency was inspired by Hoare's communicating sequential processes (CSP), as implemented and amended in Pike's earlier Newsqueak language and Winterbottom's Alef.

Language featuresEdit

Limbo supports the following features:

Virtual machineEdit

The Dis virtual machine that executes Limbo code is a CISC-like VM, with instructions for arithmetic, control flow, data motion, process creation, synchronizing and communicating between processes, loading modules of code, and support for higher-level data-types: strings, arrays, lists, and communication channels.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> It uses a hybrid of reference counting and a real-time garbage-collector for cyclic data.<ref name="gc">Template:Cite journal</ref>

Aspects of the design of Dis were inspired by the AT&T Hobbit microprocessor, as used in the original BeBox.

ExamplesEdit

Limbo uses Ada-style definitions as in:

<syntaxhighlight lang="limbo"> name := type value; name0,name1 : type = value; name2,name3 : type; name2 = value; </syntaxhighlight>

Hello worldEdit

<syntaxhighlight lang="limbo"> implement Command;

include "sys.m";

   sys: Sys;

include "draw.m";

include "sh.m";

init(nil: ref Draw->Context, nil: list of string) {

   sys = load Sys Sys->PATH;
   sys->print("Hello World!\n");

} </syntaxhighlight>

BooksEdit

The 3rd edition of the Inferno operating system and Limbo programming language are described in the textbook Inferno Programming with Limbo Template:ISBN (Chichester: John Wiley & Sons, 2003), by Phillip Stanley-Marbell. Another textbook The Inferno Programming Book: An Introduction to Programming for the Inferno Distributed System, by Martin Atkins, Charles Forsyth, Rob Pike and Howard Trickey, was started, but never released.

See alsoEdit

Template:Portal

ReferencesEdit

Template:Reflist

External linksEdit

Template:Rob Pike navbox Template:Authority control