HOME

TheInfoList



OR:

Pico is a
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
developed at the Software Languages Lab at
Vrije Universiteit Brussel The Vrije Universiteit Brussel (VUB) () is a Dutch and English-speaking research university located in Brussels, Belgium.The Vrije Universiteit Brussel is one of the five universities officially recognised by the Flemish Community, Flemish gov ...
. The language was created to introduce the essentials of programming to non-computer science students. Pico can be seen as an effort to generate a palatable and enjoyable language for people who do not want to study hard for the elegance and power of a language. They have done it by adapting Scheme's
semantics Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy Philosophy (f ...
. While designing Pico, the Software Languages Lab was inspired by the Abelson and Sussman's book "
Structure and Interpretation of Computer Programs ''Structure and Interpretation of Computer Programs'' (''SICP'') is a computer science textbook by Massachusetts Institute of Technology professors Harold Abelson and Gerald Jay Sussman with Julie Sussman. It is known as the "Wizard Book" in hac ...
". Furthermore, they were influenced by the teaching of programming at high school or academic level. Pico should be interpreted as 'small', the idea was to create a small language for educational purposes.


Language elements


Comments

Comments are surrounded by
backquote The backtick is a typographical mark used mainly in computing. It is also known as backquote, grave, or grave accent. The character was designed for typewriters to add a grave accent to a (lower-case) base letter, by overtyping it atop that let ...
s ("`").


Variables

Variables are dynamically typed; Pico uses static
scope Scope or scopes may refer to: People with the surname * Jamie Scope (born 1986), English footballer * John T. Scopes (1900–1970), central figure in the Scopes Trial regarding the teaching of evolution Arts, media, and entertainment * Cinem ...
. var: value


Functions

Functions are
first-class object In programming language design, a first-class citizen (also type, object, entity, or value) in a given programming language is an entity which supports all the operations generally available to other entities. These operations typically include ...
s in Pico. They can be assigned to variables. For example a function with two parameters param1 and param2 can be defined as: func(param1, param2): ... Functions can be called with the following syntax: func(arg1, arg2)


Operators

Operators can be used as prefix or infix in Pico: +(5, 2) 5 + 2


Data types

Pico has the following types: string,
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
,
real Real may refer to: Currencies * Brazilian real (R$) * Central American Republic real * Mexican real * Portuguese real * Spanish real * Spanish colonial real Music Albums * ''Real'' (L'Arc-en-Ciel album) (2000) * ''Real'' (Bright album) (2010) ...
and
tables Table may refer to: * Table (furniture), a piece of furniture with a flat surface and one or more legs * Table (landform), a flat area of land * Table (information), a data arrangement with rows and columns * Table (database), how the table data ...
. It does not have a native
char Char may refer to: People *Char Fontane, American actress *Char Margolis, American spiritualist * René Char (1907–1988), French poet *The Char family of Colombia: ** Fuad Char, Colombian senator ** Alejandro Char Chaljub, mayor of Barranquilla ...
type, so users should resort to size 1 strings. Tables are compound data structures that may contain any of the regular data types. Boolean types are represented by functions (as in
lambda calculus Lambda calculus (also written as ''λ''-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation ...
).


Control structures


Conditional evaluation

Only the usual if statement is included if(condition, then, else)


Code snippets

display('Hello World', eoln) max(a, b): if(a < b, b, a) `http://www.paulgraham.com/accgen.html` foo(n): fun(i): n := n+i


Implementations


Mac OS, Mac OS X


MacPicoXPico


Windows



''This version is buggy''
WinPico stable


Linux


TextPico for Linux


Cross-platform


sPico for DrScheme


External links

*{{official website
Software Languages LabDepartment of Computer Science at VUBVUBThe Infogroep Pico page
Educational programming languages Programming languages 1997 software Programming languages created in 1997