Main Page

encyclopedia.codeboy.net

 

Pico programming language

Pico is a programming language developed at the PROG lab at the dutch-speaking Free University of Brussels (Vrije Universiteit Brussel, VUB). 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 don't want to study hard for the elegance and power of a language. They've done it by adapting Scheme's syntax and semantics. While designing Pico, the PROG lab was inspired by the Abelson and Sussman's book "Structure and Interpretation of Computer Programs". 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.

Table of contents
1 Language Elements
2 Code Snippets
3 Implementations
4 External links

Language Elements

\n

Comments

\nComments are surrounded by a
backquote (`).

Variables

\n
Variables are dynamically typed, pico uses a static scope.\n var: value

Functions

\nFunctions are first-class objects in Pico. They can be assigned to variables. For example a function with two arguments arg1 and arg2 can be defined as \n func(arg1, arg2): ... Functions can be called with the following syntax: \n func(value1, value2)

Operators

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

Data Types

\nPico has the following types:
string, integer, real and tables. It does not have a native char type, so users should resort to size 1 strings. Tables are compound datastructures that may contain any of the regular datatypes. Boolean types are represented by functions, in the same way as lambda calculus does.

Control Structures

\n

Conditional Evaluation

\nOnly the usual if statement is included\n if(condition, then, else)

Code Snippets

\n display('Hello World', eoln)
max(a, b):\n  if(a < b, b, a)

Implementations

\n

Mac OS / Mac OS X

\n*
MacPico\n*XPico

Windows

\n*
WinPico This version is buggy\n*WinPico Stable

Linux

\n*
TextPico for Linux\n*gPico for Linux \n

External links

\n*
Pico Homepage\n*PROG lab\n*Department of Computer Science at VUB\n*VUB

"Everything has been figured out, except how to live." - Jean-Paul Sartre (1905-1980)