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的理論上的想法。它使用增量編譯器,這給與它某些直譯語言的靈活性,包括允許在執行時間定義新函式,和在程式執行時修改函式定義(二者都是動態編譯的特徵),而沒有直譯語言的開銷。

POP-2
編程範型函數式堆疊導向
設計者Robin Popplestone英語Robin PopplestoneRod Burstall英語Rod Burstall
面市時間1970年,​54年前​(1970
啟發語言
COWSEL英語COWSELALGOL 60ISWIM
影響語言
POP-10,POP-11英語POP-11ML

影響

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. 

參考書目

外部連結