Go to the first, previous, next, last section, table of contents.

Most Operators are Procedures

In conventional programming languages like C and Pascal, there's an awkward distinction between procedure calls and other kinds of expressions. In C, for example, (a + b) is an expression, but foo(a,b) is a procedure call. In C, you can't do the same things with an operator like + that you can do with a procedure.

In Scheme, things are much more uniform, both semantically and syntactically. Most basic operations such as addition are procedures, and there is a unified syntax for writing expressions--parenthesized prefix notation. So rather than writing (a + b) in Scheme, you write (+ a b). And rather than writing foo(a,b), you write (foo a b). Either way, it's just an operation followed by its operands, all inside parentheses.

For any procedure call expression (also called a combination), all of the values to be passed are computed before the actual call to the procedure. (This is no different from C or Pascal.)


Go to the first, previous, next, last section, table of contents.