This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages) (Learn how and when to remove this message)
|
| Pico | |
|---|---|
| Paradigms | Reflective,procedural |
| Family | Lisp |
| Designed by | Theo D'Hondt Wolfgang De Meuter |
| Developer | Vrije Universiteit Brussel |
| First appeared | 1995; 30 years ago (1995) |
| Stable release | 2.0 / 2007; 18 years ago (2007) |
| Implementation language | Scheme |
| Platform | IA-32,x86-64 |
| OS | Mac OS 9,macOS;Linux–BSD,Windows |
| Website | pico |
| Influenced by | |
| Scheme,Smalltalk | |
Pico is aprogramming language developed at the Software Languages Lab atVrije Universiteit Brussel, intended to be simple, powerful, extensible, and easy to read.[1] 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 adaptingScheme'ssemantics.
While designing Pico, the Software Languages 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.
De Meuter, Gonzalez, and D'Hondt describe the Pico syntax as being "two-tiered."[1] The first layer consists of simple rules for writing small programs in afunctional programming style.
Comments are surrounded bybackquotes ("`").
Variables are dynamicallytyped; Pico uses staticscope.
var: value
Functions, like everything in Pico, arefirst-class objects, meaning they can be assigned to variables and passed to and returned from functions. Also, there are no anonymous functions in Pico; functions must have a name.[1] For example, a function,func, with two parameters,param1 andparam2, can be defined as:
func(param1, param2): ...
Functions can be called with the following syntax:
func(arg1, arg2)
Operators can be used as prefix or infix in Pico:
+(5, 2)5 + 2
Pico has the following types:string,integer,real andtables.
It does not have a nativechar 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 inlambda calculus).
Only the usual if statement is included
if(condition, then, else)
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