ABC (程式語言)

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

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語言對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. 

參考文獻 編輯

外部連結 編輯