|
|
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 |
|
2 Code Snippets 3 Implementations 4 External links |
Language Elements
Comments
Comments are surrounded by a backquote (`).
Variables
Variables are dynamically typed, pico uses a static scope.
var: value
func(arg1, arg2): ...Functions can be called with the following syntax:
func(value1, value2)
+(5, 2) 5 + 2
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.
max(a, b):
if(a < b, b, a)
Control Structures
Conditional Evaluation
Only the usual if statement is included
if(condition, then, else)
Code Snippets
display('Hello World', eoln)Implementations
External links