ABC (programming language)
ABC is a general purpose imperative programming language and programming environment developed at the Centrum Wiskunde & Informatica from the Netherlands by Leo Geurts, Lambert Meertens and Steven Pemberton. It is interactive, structured, high-level, and is intended to be used in place of BASIC, Pascal, or AWK. It is not intended to be a systems programming language, but rather is intended for teaching or prototyping.
The language had a major influence on the design of the Python programming language; Guido van Rossum, who developed Python, previously worked for several years at the ABC system in the mid-1980s.
Features
Their designers claim that ABC programs are typically about a quarter of the size of equivalent Pascal or C programs, and more readable. Key features include:
- Only five basic data types
- No variable statement required.
- Explicit support for top-down programming.
- The anidation of instructions is indicated by sangria, through the rule of the outside game.
- Arbitrary precision, unlimited size lists and chains, and other features that support orthogonality and ease of use for beginners.
As with other interpreters, ABC is, in addition to a programming language, an interactive work environment. It does not require variable declarations, it is supported by top-down programming. It provides infinite precision arithmetic, unlimited string lists, and other features that make it very easy for beginners to use. Its designers claim that ABC programs are typically about a quarter of the size of equivalent Pascal or C language programs, and more readable.
Originally it was a monolithic application, resulting in an inability to adapt to new demands, such as creating a graphical user interface. With ABC you couldn't directly access the underlying file system and operating system.
Includes a programming environment with directed-edit syntax, hints, persistent variables, and multiple workspaces.
ABC is available as an interpreter/compiler, currently at version 1.05.02. It has also been ported to Unix, DOS, Atari, and Apple Macintosh.
ABC also had a major influence on the design of the Python programming language, Guido van Rossum, who developed Python, previously working for several years on the ABC system in the early 1980s.
Example
An example of the language, of a function to collect the set of all the words of a document:
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