POP-2
编程范型 | 函数式,面向堆栈 |
---|---|
設計者 | Robin Popplestone,Rod Burstall |
发行时间 | 1970年 |
啟發語言 | |
COWSEL,ALGOL 60,ISWIM | |
影響語言 | |
POP-10,POP-11,ML |
POP-2(也称为POP2,Package for Online Programming:在线编程包),是Robin Popplestone和Rod Burstall在大约1970年于爱丁堡大学开发的编程语言,起源于更早的语言POP-1(Robin Popplestone在1968年开发,最初叫做COWSEL)[1]。它根源于很多来源:LISP和ALGOL 60语言,和来自Peter J. Landin的理论上的想法。它使用增量编译器,这给与它某些解释型语言的灵活性,包括允许在运行时间定义新函数,和在程序运行时修改函数定义(二者都是动态编译的特征),而没有解释型语言的开销。
影响
POP-2是具有动态绑定和动态(运行时间)确定类型的函数式语言,它的语法是ALGOL风格的,而它的特征受到了Strachey和Landin工作的重大影响。它有一些显著特征,比如在部份应用中具有的一种形式的函数闭包,和受到Landin的J算子启发的一种逃脱机制(jumpout
函数),它扮演了与Lisp中的catch
/throw
类似的角色。
POP-2对ML的设计有着重要的影响,这来自它的记录结构,这里定义了数据构造子和并以字段名字作为选择子,和它的section ... endsection
指令,这是提供了初步模块性支持的一种简单名字空间管理机制,ML后来把它替代为local ... in ... end
。[2]
参见
引用
- ^ 存档副本 (PDF). [2020-05-02]. (原始内容存档 (PDF)于2012-10-03).
- ^ 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.
参考书目
- P. M. Burstall, J. S. Collins. An Introduction to the POP-2 Programming Language (PDF). 1968 [2020-05-02]. (原始内容 (PDF)存档于2012-10-03).
- R. Burstall, J. Collins, R. Popplestone. Programming in Pop-2 (PDF). Edinburgh: Edinburgh University Press. 1968 [2021-09-11]. (原始内容 (PDF)存档于2021-09-11).
- R.M. Burstall, R.J. Popplestone. POP-2 Reference Manual (PDF). Department of Machine Intelligence and Perception, University of Edinburgh. 1968 [2021-09-11]. (原始内容 (PDF)存档于2022-01-02).