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. 

參考書目[編輯]

外部連結[編輯]