Limbo,一種用於分散式系統的程式語言,在Inferno作業系統中,用它來寫作應用程式。它起源於貝爾實驗室,由西恩·都華(Sean Dorward),菲爾·溫特伯(Phil Winterbottom)與羅勃·派克(Rob Pike)設計研發。
它的並行計算模式,受到東尼·霍爾的通信顺序进程所啟發。
语言特征
Limbo支持如下特征:
- 模块化编程
- 并发编程
- 强类型检查于编译时间和运行时间
- 进程间通信经由有类型的通道
- 自动垃圾收集
- 简单的抽象数据类型
虚拟机
执行Limbo代码的Dis虚拟机是CISC类的VM,具有的指令包括:算数、控制流、数据移动、进程创建、同步和进程间通信、装载代码模块的指令,并支持高级数据类型:字符串、数组、列表和通信通道。它为了循环数据而使用了混合的引用计数和实时垃圾收集。
Dis的各方面设计受到用于最初的的微处理器的启发。
例子
Limbo使用Ada风格定义如下:
name := type value;
name0,name1 : type = value;
name2,name3 : type;
name2 = value;
Hello world
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");
}
书籍
第三版的Inferno操作系统和Limbo编程语言描述于教科书“Inferno Programming with Limbo”(Chichester: John Wiley & Sons, 2003),Phillip Stanley-Marbell。
参见
- Inferno操作系统
- ,Limbo的先驱
- 贝尔实验室9号计划
- Go,Google的类似语言
引用
外部链接
- [http://www.vitanuova.com/inferno/limbo.html Vita Nuova page on Limbo]
- [http://doc.cat-v.org/inferno/4th_edition/limbo_language/descent A Descent into Limbo] by Brian Kernighan
- [https://web.archive.org/web/20130601024813/http://doc.cat-v.org/inferno/4th_edition/limbo_language/limbo The Limbo Programming Language] by Dennis M. Ritchie and [http://doc.cat-v.org/inferno/4th_edition/limbo_language/addendum Addendum] by Vita Nuova.
- [https://web.archive.org/web/20081011054044/http://www.gemusehaken.org/ipwl/ Inferno Programming with Limbo] by Phillip Stanley-Marbell
- [http://swtch.com/~rsc/thread/ Threaded programming in the Bell Labs CSP style]
*
- .
- .
- .
评论 (0)