Syntax



next up previous
Next: An Application that Up: Scheme Previous: Closures

Syntax

As you have probably already noticed, Scheme's syntax is Lisp-like. All function applications are in fully-parenthesized prefix form. While some find this sort of syntax unwieldy, it has the advantage that Scheme forms are actually lists which can be easily manipulated with standard list primitives. The libscheme library supports the defmacro special form that can be used by end users to create new special forms. A special form is a form that is evaluated by special rules. For example, the if special form only evaluates its ``then'' condition if its test expression evaluates to true, otherwise it evalutes its ``else'' expression.

These macros are much more powerful than the simple token-based substitution macros provided by languages like C.



Brent Benson
Mon Sep 19 16:03:14 EDT 1994