ABC (程式語言)

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書
ABC
編程範型多範式指令式過程式結構化
設計者里奧·格茨(Leo Geurts)
蘭伯特·梅爾滕斯英語Lambert Meertens
史蒂文·彭伯頓英語Steven Pemberton
實作者荷蘭數學和計算機科學研究學會
面市時間1987年1月,​37年前​(1987-01
型態系統強類型, 多態
操作系統類Unix, Windows, MacOS, Atari TOS
網站homepages.cwi.nl/~steven/abc/ 編輯維基數據鏈接
啟發語言
SETL, ALGOL 68[1]
影響語言
Python

ABC是一種指令式通用程式語言編程環境,最初由荷蘭數學和計算機科學研究學會(CWI)的里奧·格茨(Leo Geurts)、蘭伯特·梅爾滕斯英語Lambert Meertens史蒂文·彭伯頓英語Steven Pemberton開發。它是指令式、結構化的高級語言,意圖用來取代BASICPascalAWK,它的設計目標是用於教學或建立原型,而非用作一種系統編程語言。

ABC語言對Python語言有着主要的影響,Python的創立者吉多·范羅蘇姆在1982年至1986年間參與了ABC系統的設計與實現工作[2][3]

特徵[編輯]

ABC的設計者聲稱,典型的ABC程序的大小只是等價的Pascal或C程序的四分之一,並且更加具有可讀性。它的關鍵特徵包括:

ABC最初是一個單體實現,導致它不能適配新的需求,比如建立圖形用戶界面。ABC不能直接訪問底層文件系統和操作系統。

完全的ABC系統包括了使用結構編輯器英語Structure editor(語法導向編輯器)、提示、持久變量和多工作空間的編程環境,並可獲得到ABC的解釋器/編譯器,其當前版本是1.05.02,它已經移植到了UnixDOSAtariApple Macintosh

例子[編輯]

一個函數words,它在文檔中收集出所有單詞的集合:

HOW TO RETURN words document:
   PUT {} IN collection
   FOR line IN document:
      FOR word IN split line:
         IF word not.in collection:
            INSERT word IN collection
   RETURN collection

引用[編輯]

  1. ^ "He was clearly influenced by ALGOL 68's philosophy of providing constructs that can be combined in many different ways to produce all sorts of different data structures or ways of structuring a program." - Guido van Rossum Federico Biancuzzi; Shane Warden. Masterminds of Programming: Conversations with the Creators of Major Programming Languages. O'Reilly Media. April 2009: 32 [December 14, 2009]. ISBN 0-596-51517-0. 
  2. ^ Hamilton, Naomi. The A-Z of Programming Languages: Python. Computerworld (IDG Communications). 2008-05-08 [2020-09-04]. (原始內容存檔於2023-03-21). Being youthful at the time I figured I could design and implement a language "almost, but not quite, entirely unlike" ABC, improving upon ABC's deficiencies, and solve our support applications problem, so around Christmas 1989, I started hacking. 
  3. ^ Stewart, Bruce. An Interview with Guido van Rossum. ONLamp.com. O』Reilly Media. 2002-06-04 [2020-09-04]. (原始內容存檔於2013-03-13). I had been part of the ABC development team in the early 『80s, and in my head I had analyzed some of the reasons it had failed. 

參考文獻[編輯]

外部連結[編輯]