Alef (programming language)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description Script error: No such module "Infobox".Template:Template otherScript error: No such module "Check for unknown parameters". Alef is a discontinued concurrent programming language, designed as part of the Plan 9 operating system by Phil Winterbottom of Bell Labs. It implemented the channel-based concurrency model of Newsqueak in a compiled, C-like language.

History

Alef appeared in the first and second editions of Plan 9, but was abandoned during development of the third edition.[1][2] Rob Pike later explained Alef's demise by pointing to its lack of automatic memory management, despite Pike's and other people's urging Winterbottom to add garbage collection to the language;[3] also, in a February 2000 slideshow, Pike noted: "…although Alef was a fruitful language, it proved too difficult to maintain a variant language across multiple architectures, so we took what we learned from it and built the thread library for C."[4]

Alef was superseded by two programming environments. The Limbo programming language can be considered a direct successor of Alef and is the most commonly used language in the Inferno operating system. The Alef concurrency model was replicated in the third edition of Plan 9 in the form of the libthread library, which makes some of Alef's functionality available to C programs and allowed existing Alef programs (such as Acme) to be translated.[5]

Example

This example was taken from the Alef reference manual.[1] The piece illustrates the use of the tuple data type.

(int, byte*, byte) 
func() 
{ 
    return (10, "hello", 'c'); 
}

void 
main() 
{
    int a; 
    byte* str; 
    byte c; 
    (a, str, c) = func(); 
}

See also

References

Template:Reflist

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".

Template:Programming language


Template:Prog-lang-stub

  1. a b Cite error: Invalid <ref> tag; no text was provided for refs named alefref
  2. Cite error: Invalid <ref> tag; no text was provided for refs named 3e-preface
  3. Script error: No such module "citation/CS1".Template:Cbignore
  4. Script error: No such module "citation/CS1".
  5. Cite error: Invalid <ref> tag; no text was provided for refs named libthread