POP-2

本页使用了标题或全文手工转换
维基百科,自由的百科全书
POP-2
编程范型函数式面向堆栈
設計者Robin Popplestone英语Robin PopplestoneRod Burstall英语Rod Burstall
发行时间1970年,​54年前​(1970
啟發語言
COWSEL英语COWSELALGOL 60ISWIM
影響語言
POP-10,POP-11英语POP-11ML

POP-2(也称为POP2Package for Online Programming:在线编程包),是Robin Popplestone英语Robin PopplestoneRod Burstall英语Rod Burstall在大约1970年于爱丁堡大学开发的编程语言,起源于更早的语言POP-1(Robin Popplestone在1968年开发,最初叫做COWSEL英语COWSEL[1]。它根源于很多来源:LISPALGOL 60语言,和来自Peter J. Landin的理论上的想法。它使用增量式编译器英语incremental compiler,这给与它某些解释型语言的灵活性,包括允许在运行时间定义新函数,和在程序运行时修改函数定义(二者都是动态编译的特征),而没有解释型语言的开销。

影响

POP-2是具有动态绑定和动态(运行时间)确定类型的函数式语言,它的语法是ALGOL风格的,而它的特征受到了StracheyLandin工作的重大影响。它有一些显著特征,比如在部份应用中具有的一种形式的函数闭包,和受到Landin的J算子启发的一种逃脱机制(jumpout函数),它扮演了与Lisp中的catch/throw类似的角色。

POP-2对ML的设计有着重要的影响,这来自它的记录结构,这里定义了数据构造子和并以字段名字作为选择子,和它的section ... endsection指令,这是提供了初步模块性支持的一种简单名字空间管理机制,ML后来把它替代为local ... in ... end[2]

参见

引用

  1. ^ 存档副本 (PDF). [2020-05-02]. (原始内容存档 (PDF)于2012-10-03). 
  2. ^ David MacQueen, Robert Harper, John Reppy. The History of Standard ML (PDF). 2020 [2021-09-11]. (原始内容 (PDF)存档于2022-02-13). POP-2 was designed by Robin Popplestone and Burstall in the late 1960s [1977; 1968; 1968a], following on Popplestone’s earlier POP-1 language [1968b]. Like Lisp, POP-2 was a functional language with dynamic binding and dynamic (i.e., runtime) typing, but its syntax was in the ALGOL-style, and its features were heavily influenced by the work of Strachey and Landin. It had a number of notable features such as a form of function closure via partial application and an escape mechanism (the jumpout function) inspired by Landin’s J operator that plays a rôle similar to catch/throw in Lisp. The design of ML was also influenced by POP-2’s record structures and by its sections, a simple mechanism for name-space management that provided rudimentary support for modularity. 

参考书目

外部链接