Richard W. DeVaul
Prof. John Maeda
Aesthetics and Computation Group, MIT Media Laboratory.
The introduction of sets fixes two major deficiencies in Scheme lisp: weak typing and no syntax for parallel operations.
In Sol, any conceivable simple or compound data type can be described through sets and set operations. This flexible and precise data typing allows the development of code that is more expressive and reliable.
Sets of procedures in Sol are evaluated in parallel, given the language a clean lexically parallel syntax; One see at a glance parallel operations in a Sol program.
Here is a Sol program fragment showing the power of flexible, explicit typeing using sets:
;; Define a new set containing error strings (define errors (set "divide by zero" "insufficient user inteligence")) ;; Define a set which is the union of the error strings and ;; the real numbers (define mySet (union real errors)) ;; Define a function which returns a member of mySet (define myDivide (function mySet ; A function returning mySet ((numerator real) ; numerator must be real number (denominator real)) ; denominator must be real number (if (= 0 denomiator) ; Check for divide by zero (return "divide by zero") (return (/ numerator denominator)))))
previous | Outline | next | ||
---|---|---|---|---|
What is Scheme? | Categories |