POP-2
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的理論上的想法。它使用增量編譯器,這給與它某些直譯語言的靈活性,包括允許在執行時間定義新函式,和在程式執行時修改函式定義(二者都是動態編譯的特徵),而沒有直譯語言的開銷。
編程範型 | 函數式,堆疊導向 |
---|---|
設計者 | Robin Popplestone,Rod Burstall |
面市時間 | 1970年 |
啟發語言 | |
COWSEL,ALGOL 60,ISWIM | |
影響語言 | |
POP-10,POP-11,ML |
影響
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).